i noticed in my project when i use the reload button in the viewer panel, it breaks the hard coded shaders i have (the shader example project works fine)
is this because i define shaders directly in my files?
e.g. of a “hard coded shader”
Color = {
v = [[
uniform mat4 modelViewProjection;
uniform vec3 modColor;
uniform float modAlpha;
attribute vec4 position;
attribute vec4 color;
attribute vec2 texCoord;
varying lowp vec4 vColor;
varying highp vec2 vTexCoord;
void main() {
vColor=vec4( color.rgb * modColor.rgb, color.a * modAlpha );
vTexCoord = texCoord;
gl_Position = modelViewProjection * position;
}
]],
f = [[
precision highp float;
uniform lowp sampler2D texture;
varying lowp vec4 vColor;
varying highp vec2 vTexCoord;
void main() {
lowp vec4 col = texture2D( texture, vTexCoord)*vColor;
gl_FragColor = vec4( vColor.r, vColor.g, vColor.b, vColor.a );
}
]]
}
myColorShader = shader(Color.v, Color.f)