mirror of
https://github.com/raysan5/raylib.git
synced 2026-02-04 21:29:18 -05:00
Update shaders_raymarching.c
This commit is contained in:
@ -77,9 +77,7 @@ int main(void)
|
|||||||
// Check if screen is resized
|
// Check if screen is resized
|
||||||
if (IsWindowResized())
|
if (IsWindowResized())
|
||||||
{
|
{
|
||||||
screenWidth = GetScreenWidth();
|
float resolution[2] = { (float)GetScreenWidth(), (float)GetScreenHeight() };
|
||||||
screenHeight = GetScreenHeight();
|
|
||||||
float resolution[2] = { (float)screenWidth, (float)screenHeight };
|
|
||||||
SetShaderValue(shader, resolutionLoc, resolution, SHADER_UNIFORM_VEC2);
|
SetShaderValue(shader, resolutionLoc, resolution, SHADER_UNIFORM_VEC2);
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
@ -93,10 +91,10 @@ int main(void)
|
|||||||
// We only draw a white full-screen rectangle,
|
// We only draw a white full-screen rectangle,
|
||||||
// frame is generated in shader using raymarching
|
// frame is generated in shader using raymarching
|
||||||
BeginShaderMode(shader);
|
BeginShaderMode(shader);
|
||||||
DrawRectangle(0, 0, screenWidth, screenHeight, WHITE);
|
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), WHITE);
|
||||||
EndShaderMode();
|
EndShaderMode();
|
||||||
|
|
||||||
DrawText("(c) Raymarching shader by Iñigo Quilez. MIT License.", screenWidth - 280, screenHeight - 20, 10, BLACK);
|
DrawText("(c) Raymarching shader by Iñigo Quilez. MIT License.", GetScreenWidth() - 280, GetScreenHeight() - 20, 10, BLACK);
|
||||||
|
|
||||||
EndDrawing();
|
EndDrawing();
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user