diff options
| author | realtradam <[email protected]> | 2023-03-26 00:52:13 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2023-03-26 00:52:13 -0400 |
| commit | 4670ac42a773ea97157f71d78687f79d6ba3c1d9 (patch) | |
| tree | 3c70b7d4073d48ff3c5066c9cf7ab812031a3551 /src/shaders/simple.fragment.sc | |
| parent | 2577adf913e292a4a515e7dfc4023e37e8177f46 (diff) | |
| download | RodeoKit-4670ac42a773ea97157f71d78687f79d6ba3c1d9.tar.gz RodeoKit-4670ac42a773ea97157f71d78687f79d6ba3c1d9.zip | |
added loading images as well as loding textures
Diffstat (limited to 'src/shaders/simple.fragment.sc')
| -rw-r--r-- | src/shaders/simple.fragment.sc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/shaders/simple.fragment.sc b/src/shaders/simple.fragment.sc index 4ae2f48..ab72ae4 100644 --- a/src/shaders/simple.fragment.sc +++ b/src/shaders/simple.fragment.sc @@ -1,4 +1,4 @@ -$input v_color0, v_texcoord0 +$input v_color0, v_texcoord0, v_texcoord1 #include <bgfx_shader.sh> @@ -17,12 +17,12 @@ SAMPLER2D(texture_0, 1); void main() { - //if(v_texcoord0.y < 0.0) - //{ - gl_FragColor = v_color0 * texture2D(default_texture, v_texcoord0.xy); - //} - //else - //{ - //gl_FragColor = v_color0 * texture2D(texture_0, v_texcoord0.xy); - //} + if(v_texcoord1 == 1.0) + { + gl_FragColor = v_color0 * texture2D(texture_0, v_texcoord0.xy); + } + else + { + gl_FragColor = v_color0 * texture2D(default_texture, v_texcoord0.xy); + } } |
