09-15-2018 10:00 AM
{ return; }
{
v3 = vec3(1,1,1); return; // just leaves the scope... v3 = vec3(0,0,0); // this is not executed but the shader continues after the braces
}
... // continues here, setting
v3 = v3 + vec3(1,1,1); // v3 is 2,2,2 now
#version 310 es
#if defined(GL_EXT_texture_cube_map_array)
#extension GL_EXT_texture_cube_map_array : enable
#endif
#if defined( GL_OVR_multiview2 )
#extension GL_OVR_multiview2 : enable
#else
#define gl_ViewID_OVR 0
#endif
precision mediump float;
precision mediump samplerCubeArray;
09-26-2018 02:07 PM
... tothis here:static const char FRAGMENT_SHADER[] =
"in lowp vec4 fragmentColor;\n"
"out lowp vec4 outColor;\n"
"void main()\n"
"{\n"
" outColor = fragmentColor;\n"
"}\n";
static const char FRAGMENT_SHADER[] =
"in lowp vec4 fragmentColor;\n"
"out lowp vec4 outColor;\n"
"void main()\n"
"{\n"
" outColor = vec4(1.0,1.0,1.0,1.0);\n"
" { return; } \n"
" outColor = fragmentColor;\n"
"}\n";
10-04-2018 04:01 AM
10-08-2018 10:19 AM
10-08-2018 10:19 AM
10-16-2018 12:02 AM