Hi!
I’ve encountered a brick wall in my shadergraph development.
I’m trying to only use GLES2.0-friendly shaders.
I need to connect a TilingAndOffset Node into SampleTexture2D’s UV Input, which doesn’t let me to connect (cant be used for vertex-stage sampling). So instead of SampleTexture2D i use SampleTexture2DLOD, which then does allow me to connect the out/in. However when the shader compiles, it gives me an error ‘cannot map expression to vs_5_0 in: GLES20’. When i export for GLES3.0+, the shader still works, however in GLES2.0 it doesn’t (the errors hit and i get pink texture).
Does the SampleTexture2DLOD really require GLES3.0+? Or should i report bug?
U2019.3.0f3
ShaderGraph 7.1.8
Any suggestion on how to circumvent this issue using ShaderGraph? What im trying to achieve is to ‘animate’ the movement of the tiled texture (the one with the white cricles), then use that as a vertex displacement for the MainTex Diffuse texture (btw i cant use Voronoi, its too slow).
TL;DR:
- Using SampleTexture2DLOD requires GLES 3.0+ and shader breaks on GLES2.0-only devices.
- There is also a caching bug, making ShaderGraph’s inspector [Compile and show code] button unusable.
Both above cases were tested and are present on different versions on Unity and ShaderGraph up to U2020.1b and ShaderGraph 8.1.