|
@@ -70,7 +70,7 @@ int main(void)
|
|
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - postprocessing shader");
|
|
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - postprocessing shader");
|
|
|
|
|
|
// Define the camera to look into our 3d world
|
|
// Define the camera to look into our 3d world
|
|
- Camera camera = {{ 2.0f, 3.0f, 2.0f }, { 0.0f, 1.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
|
|
|
|
|
|
+ Camera camera = { { 2.0f, 3.0f, 2.0f }, { 0.0f, 1.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
|
|
|
|
|
|
Model model = LoadModel("resources/models/church.obj"); // Load OBJ model
|
|
Model model = LoadModel("resources/models/church.obj"); // Load OBJ model
|
|
Texture2D texture = LoadTexture("resources/models/church_diffuse.png"); // Load model texture (diffuse map)
|
|
Texture2D texture = LoadTexture("resources/models/church_diffuse.png"); // Load model texture (diffuse map)
|
|
@@ -81,7 +81,7 @@ int main(void)
|
|
// Load all postpro shaders
|
|
// Load all postpro shaders
|
|
// NOTE 1: All postpro shader use the base vertex shader (DEFAULT_VERTEX_SHADER)
|
|
// NOTE 1: All postpro shader use the base vertex shader (DEFAULT_VERTEX_SHADER)
|
|
// NOTE 2: We load the correct shader depending on GLSL version
|
|
// NOTE 2: We load the correct shader depending on GLSL version
|
|
- Shader shaders[MAX_POSTPRO_SHADERS];
|
|
|
|
|
|
+ Shader shaders[MAX_POSTPRO_SHADERS] = { 0 };
|
|
|
|
|
|
// NOTE: Defining 0 (NULL) for vertex shader forces usage of internal default vertex shader
|
|
// NOTE: Defining 0 (NULL) for vertex shader forces usage of internal default vertex shader
|
|
shaders[FX_GRAYSCALE] = LoadShader(0, FormatText("resources/shaders/glsl%i/grayscale.fs", GLSL_VERSION));
|
|
shaders[FX_GRAYSCALE] = LoadShader(0, FormatText("resources/shaders/glsl%i/grayscale.fs", GLSL_VERSION));
|