Debian Codegraph @

examples/viewport_and_scenes/shader_effects/data/shaders/texture_effect.fs

raw
1 uniform sampler2D testTexture;
2
3 varying vec4 my_vertex_object;
4
5 // Modify the fragment color by given texture.
6 // Use coordinates in object-space as texture coordinates
7 // (just for test).
8 void PLUG_fragment_modify(inout vec4 fragment_color)
9 {
10 vec2 tex_coord = my_vertex_object.xy;
11 fragment_color.rgb = texture2D(testTexture, tex_coord).rgb;
12 }