diff options
| author | Ray <[email protected]> | 2021-04-22 18:55:24 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2021-04-22 18:55:24 +0200 |
| commit | dcf52c132fb0ca28f37dae9d957155e2541df812 (patch) | |
| tree | b6c263e59daba00fc33badd0a45fa6756d5df14c /examples/shaders/shaders_multi_sample2d.c | |
| parent | f92ee46d86b5a0cfb05c10b0c31fb966a4784b44 (diff) | |
| download | raylib-dcf52c132fb0ca28f37dae9d957155e2541df812.tar.gz raylib-dcf52c132fb0ca28f37dae9d957155e2541df812.zip | |
Remove trail spaces
Diffstat (limited to 'examples/shaders/shaders_multi_sample2d.c')
| -rw-r--r-- | examples/shaders/shaders_multi_sample2d.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/examples/shaders/shaders_multi_sample2d.c b/examples/shaders/shaders_multi_sample2d.c index 2ff6f200..fbe75085 100644 --- a/examples/shaders/shaders_multi_sample2d.c +++ b/examples/shaders/shaders_multi_sample2d.c @@ -42,10 +42,10 @@ int main(void) UnloadImage(imBlue); Shader shader = LoadShader(0, TextFormat("resources/shaders/glsl%i/color_mix.fs", GLSL_VERSION)); - + // Get an additional sampler2D location to be enabled on drawing int texBlueLoc = GetShaderLocation(shader, "texture1"); - + // Get shader uniform for divider int dividerLoc = GetShaderLocation(shader, "divider"); float dividerValue = 0.5f; @@ -60,34 +60,34 @@ int main(void) //---------------------------------------------------------------------------------- if (IsKeyDown(KEY_RIGHT)) dividerValue += 0.01f; else if (IsKeyDown(KEY_LEFT)) dividerValue -= 0.01f; - + if (dividerValue < 0.0f) dividerValue = 0.0f; else if (dividerValue > 1.0f) dividerValue = 1.0f; - + SetShaderValue(shader, dividerLoc, ÷rValue, SHADER_UNIFORM_FLOAT); //---------------------------------------------------------------------------------- - + // Draw //---------------------------------------------------------------------------------- BeginDrawing(); - + ClearBackground(RAYWHITE); BeginShaderMode(shader); - + // WARNING: Additional samplers are enabled for all draw calls in the batch, // EndShaderMode() forces batch drawing and consequently resets active textures // to let other sampler2D to be activated on consequent drawings (if required) SetShaderValueTexture(shader, texBlueLoc, texBlue); - + // We are drawing texRed using default sampler2D texture0 but // an additional texture units is enabled for texBlue (sampler2D texture1) DrawTexture(texRed, 0, 0, WHITE); - + EndShaderMode(); - + DrawText("Use KEY_LEFT/KEY_RIGHT to move texture mixing in shader!", 80, GetScreenHeight() - 40, 20, RAYWHITE); - + EndDrawing(); //---------------------------------------------------------------------------------- } |
