Skip to content

Commit

Permalink
Corrected Minor Typos in shaders
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahFreelove committed Jul 27, 2022
1 parent 316cccc commit 03c0cbc
Show file tree
Hide file tree
Showing 21 changed files with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Interpolated values from the vertex shaders
in vec2 UV;

// Ouput data
// Output data
out vec3 color;

// Values that stay constant for the whole mesh.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Interpolated values from the vertex shaders
in vec2 UV;

// Ouput data
// Output data
out vec3 color;

// Values that stay constant for the whole mesh.
Expand Down
4 changes: 2 additions & 2 deletions tutorial08_basic_shading/StandardShading.fragmentshader
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ in vec3 Normal_cameraspace;
in vec3 EyeDirection_cameraspace;
in vec3 LightDirection_cameraspace;

// Ouput data
// Output data
out vec3 color;

// Values that stay constant for the whole mesh.
Expand All @@ -18,7 +18,7 @@ uniform vec3 LightPosition_worldspace;
void main(){

// Light emission properties
// You probably want to put them as uniforms
// You'll probably want to put them as uniforms
vec3 LightColor = vec3(1,1,1);
float LightPower = 50.0f;

Expand Down
2 changes: 1 addition & 1 deletion tutorial09_vbo_indexing/StandardShading.fragmentshader
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ in vec3 Normal_cameraspace;
in vec3 EyeDirection_cameraspace;
in vec3 LightDirection_cameraspace;

// Ouput data
// Output data
out vec3 color;

// Values that stay constant for the whole mesh.
Expand Down
2 changes: 1 addition & 1 deletion tutorial10_transparency/StandardShading.vertexshader
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void main(){
vec3 vertexPosition_cameraspace = ( V * M * vec4(vertexPosition_modelspace,1)).xyz;
EyeDirection_cameraspace = vec3(0,0,0) - vertexPosition_cameraspace;

// Vector that goes from the vertex to the light, in camera space. M is ommited because it's identity.
// Vector that goes from the vertex to the light, in camera space. M is omitted because it's identity.
vec3 LightPosition_cameraspace = ( V * vec4(LightPosition_worldspace,1)).xyz;
LightDirection_cameraspace = LightPosition_cameraspace + EyeDirection_cameraspace;

Expand Down
2 changes: 1 addition & 1 deletion tutorial11_2d_fonts/StandardShading.fragmentshader
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ in vec3 Normal_cameraspace;
in vec3 EyeDirection_cameraspace;
in vec3 LightDirection_cameraspace;

// Ouput data
// Output data
out vec3 color;

// Values that stay constant for the whole mesh.
Expand Down
2 changes: 1 addition & 1 deletion tutorial11_2d_fonts/TextVertexShader.fragmentshader
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Interpolated values from the vertex shaders
in vec2 UV;

// Ouput data
// Output data
out vec4 color;

// Values that stay constant for the whole mesh.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ in vec3 Normal_cameraspace;
in vec3 EyeDirection_cameraspace;
in vec3 LightDirection_cameraspace;

// Ouput data
// Output data
out vec3 color;

// Values that stay constant for the whole mesh.
Expand Down
2 changes: 1 addition & 1 deletion tutorial13_normal_mapping/NormalMapping.fragmentshader
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ in vec3 LightDirection_cameraspace;
in vec3 LightDirection_tangentspace;
in vec3 EyeDirection_tangentspace;

// Ouput data
// Output data
out vec3 color;

// Values that stay constant for the whole mesh.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ in vec3 Normal_cameraspace;
in vec3 EyeDirection_cameraspace;
in vec3 LightDirection_cameraspace;

// Ouput data
// Output data
layout(location = 0) out vec3 color;

// Values that stay constant for the whole mesh.
Expand Down Expand Up @@ -37,7 +37,7 @@ void main(){
// Cosine of the angle between the normal and the light direction,
// clamped above 0
// - light is at the vertical of the triangle -> 1
// - light is perpendiular to the triangle -> 0
// - light is perpendicular to the triangle -> 0
// - light is behind the triangle -> 0
float cosTheta = clamp( dot( n,l ), 0,1 );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Interpolated values from the vertex shaders
in vec2 UV;

// Ouput data
// Output data
out vec3 color;

// Values that stay constant for the whole mesh.
Expand Down
2 changes: 1 addition & 1 deletion tutorial16_shadowmaps/DepthRTT.fragmentshader
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#version 330 core

// Ouput data
// Output data
layout(location = 0) out float fragmentdepth;


Expand Down
4 changes: 2 additions & 2 deletions tutorial16_shadowmaps/ShadowMapping.fragmentshader
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ in vec3 EyeDirection_cameraspace;
in vec3 LightDirection_cameraspace;
in vec4 ShadowCoord;

// Ouput data
// Output data
layout(location = 0) out vec3 color;

// Values that stay constant for the whole mesh.
Expand Down Expand Up @@ -64,7 +64,7 @@ void main(){
// Cosine of the angle between the normal and the light direction,
// clamped above 0
// - light is at the vertical of the triangle -> 1
// - light is perpendiular to the triangle -> 0
// - light is perpendicular to the triangle -> 0
// - light is behind the triangle -> 0
float cosTheta = clamp( dot( n,l ), 0,1 );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
in vec2 UV;
in vec4 ShadowCoord;

// Ouput data
// Output data
layout(location = 0) out vec3 color;

// Values that stay constant for the whole mesh.
Expand Down
2 changes: 1 addition & 1 deletion tutorial16_shadowmaps/SimpleTexture.fragmentshader
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#version 330 core

// Ouput data
// Output data
layout(location = 0) out vec4 color;

uniform sampler2D texture;
Expand Down
2 changes: 1 addition & 1 deletion tutorial17_rotations/StandardShading.fragmentshader
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ in vec3 Normal_cameraspace;
in vec3 EyeDirection_cameraspace;
in vec3 LightDirection_cameraspace;

// Ouput data
// Output data
out vec3 color;

// Values that stay constant for the whole mesh.
Expand Down
2 changes: 1 addition & 1 deletion tutorial17_rotations/StandardShading.vertexshader
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void main(){
vec3 vertexPosition_cameraspace = ( V * M * vec4(vertexPosition_modelspace,1)).xyz;
EyeDirection_cameraspace = vec3(0,0,0) - vertexPosition_cameraspace;

// Vector that goes from the vertex to the light, in camera space. M is ommited because it's identity.
// Vector that goes from the vertex to the light, in camera space. M is omitted because it's identity.
vec3 LightPosition_cameraspace = ( V * vec4(LightPosition_worldspace,1)).xyz;
LightDirection_cameraspace = LightPosition_cameraspace + EyeDirection_cameraspace;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Interpolated values from the vertex shaders
in vec2 UV;

// Ouput data
// Output data
out vec4 color;

uniform sampler2D myTextureSampler;
Expand Down
2 changes: 1 addition & 1 deletion tutorial18_billboards_and_particles/Billboard.vertexshader
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void main()
//vertexPosition_worldspace = particleCenter_wordspace;
//gl_Position = VP * vec4(vertexPosition_worldspace, 1.0f); // Get the screen-space position of the particle's center
//gl_Position /= gl_Position.w; // Here we have to do the perspective division ourselves.
//gl_Position.xy += squareVertices.xy * vec2(0.2, 0.05); // Move the vertex in directly screen space. No need for CameraUp/Right_worlspace here.
//gl_Position.xy += squareVertices.xy * vec2(0.2, 0.05); // Move the vertex in directly screen space. No need for CameraUp/Right_worldspace here.

// Or, if BillboardSize is in pixels :
// Same thing, just use (ScreenSizeInPixels / BillboardSizeInPixels) instead of BillboardSizeInScreenPercentage.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
in vec2 UV;
in vec4 particlecolor;

// Ouput data
// Output data
out vec4 color;

uniform sampler2D myTextureSampler;
Expand Down
4 changes: 2 additions & 2 deletions tutorial18_billboards_and_particles/Particle.vertexshader
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

// Input vertex data, different for all executions of this shader.
layout(location = 0) in vec3 squareVertices;
layout(location = 1) in vec4 xyzs; // Position of the center of the particule and size of the square
layout(location = 2) in vec4 color; // Position of the center of the particule and size of the square
layout(location = 1) in vec4 xyzs; // Position of the center of the particle and size of the square
layout(location = 2) in vec4 color; // Position of the center of the particle and size of the square

// Output data ; will be interpolated for each fragment.
out vec2 UV;
Expand Down

0 comments on commit 03c0cbc

Please sign in to comment.