Blender 3.6 - custom shader OpenGL ES version not compiling
- Dominant language
- C++
- Stars
- 3.3k
- Forks
- 353
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 1
Description
**Description**
Using custom some shaders in Armory as described here : [https://github.com/armory3d/shader_pack](https://github.com/armory3d/shader_pack)
do not work anymore since upgrading to Blender 3.6 and latest version.
The file and shader using the OpenGL ES 310 version is compiling correctly when using Blender 3.3 with the previous repo, but stop working with the latest version.
**To Reproduce**
add a custom shader in a material and set the shader to
`#version 310 es`
**Expected behavior**
In this example, it is a simple grass shader with wind.

**System**
Blender: 3.6
Armory: current repo
OS: win10
**Test File**
Test file Bundle source :
[https://github.com/onelsonic/armory_tests/raw/master/custom_shader.7z](https://github.com/onelsonic/armory_tests/raw/master/custom_shader.7z)
```
When compiling with Blender and latest repo the shader compilation will crash with the following error :
Unable to parse built-ins
`
`
ERROR: 0:2798: 'redefinition of built-in function' : not supported with this profile: es
INTERNAL ERROR: Unable to parse built-ins
..
..
..
ERROR: C:\custom_shader\compiled\Shaders\Project\GrassMaterial.frag.glsl:17: 'texture' : no matching overloaded function found
ERROR: C:\custom_shader\compiled\Shaders\Project\GrassMaterial.frag.glsl:17: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
ERROR: Linking fragment stage: Missing entry point: Each stage requires one entry point
SPIR-V is not generated for failed compile or link
Compiling shader 1 of 2 (GrassMaterial.frag.glsl) failed:
Shader compiler error.
(node:6348) UnhandledPromiseRejectionWarning: Shader compiler error.
(node:6348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:6348) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Finished in 2.955s
ERROR: Build failed, check console
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the linked custom_shader.7z test bundle and reproduce the failure using Blender 3.6 and the current repository. Inspect the generated Shaders/Project/GrassMaterial.frag.glsl output and the reported built-in and texture errors; done means the custom shader using #version 310 es compiles and links successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- blender
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100