From d2e2069f23b25dc2e09a45d828be65437e440516 Mon Sep 17 00:00:00 2001 From: AVinitzca Date: Tue, 24 Sep 2024 22:28:33 -0300 Subject: [PATCH] Fixed indentation in file and comments in spanish --- .../Content/Effects/SphereVertexShader.fx | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/TGC.MonoGame.Samples/Content/Effects/SphereVertexShader.fx b/TGC.MonoGame.Samples/Content/Effects/SphereVertexShader.fx index 5ed9cc3..979c876 100644 --- a/TGC.MonoGame.Samples/Content/Effects/SphereVertexShader.fx +++ b/TGC.MonoGame.Samples/Content/Effects/SphereVertexShader.fx @@ -1,10 +1,10 @@ #if OPENGL - #define SV_POSITION POSITION - #define VS_SHADERMODEL vs_3_0 - #define PS_SHADERMODEL ps_3_0 + #define SV_POSITION POSITION + #define VS_SHADERMODEL vs_3_0 + #define PS_SHADERMODEL ps_3_0 #else - #define VS_SHADERMODEL vs_4_0_level_9_1 - #define PS_SHADERMODEL ps_4_0_level_9_1 + #define VS_SHADERMODEL vs_4_0_level_9_1 + #define PS_SHADERMODEL ps_4_0_level_9_1 #endif // Custom Effects - https://docs.monogame.net/articles/content/custom_effects.html @@ -20,30 +20,30 @@ uniform float Time = 0; struct VertexShaderInput { - // Posicion en espacio local - float4 Position : POSITION0; - float3 Normal : NORMAL0; + // Local Space Position + float4 Position : POSITION0; + float3 Normal : NORMAL0; }; struct VertexShaderOutput { - // Posicion en espacio de proyeccion - float4 Position : SV_POSITION; + // Projection Space Position + float4 Position : SV_POSITION; }; VertexShaderOutput MainVS(in VertexShaderInput input) { - VertexShaderOutput output = (VertexShaderOutput)0; + VertexShaderOutput output = (VertexShaderOutput)0; - input.Position.x += 0.05 * sin(input.Position.y * 10.0 + Time * 10.0); + input.Position.x += 0.05 * sin(input.Position.y * 10.0 + Time * 10.0); - // Local a Mundo + // Local to World float4 worldPosition = mul(input.Position, World); - - // Mundo a Vista + + // World to View float4 viewPosition = mul(worldPosition, View); - // Vista a Proyeccion + // View to Projection output.Position = mul(viewPosition, Projection); return output; @@ -56,10 +56,10 @@ float4 MainPS(VertexShaderOutput input) : COLOR technique BaseTechnique { - pass P0 - { - VertexShader = compile VS_SHADERMODEL MainVS(); - PixelShader = compile PS_SHADERMODEL MainPS(); - } + pass P0 + { + VertexShader = compile VS_SHADERMODEL MainVS(); + PixelShader = compile PS_SHADERMODEL MainPS(); + } };