diff --git a/PCK-Studio/PckStudio.csproj b/PCK-Studio/PckStudio.csproj index 306bb478..3743c6f1 100644 --- a/PCK-Studio/PckStudio.csproj +++ b/PCK-Studio/PckStudio.csproj @@ -649,8 +649,8 @@ - - + + diff --git a/PCK-Studio/Properties/Resources.Designer.cs b/PCK-Studio/Properties/Resources.Designer.cs index 0a532903..868d7ef1 100644 --- a/PCK-Studio/Properties/Resources.Designer.cs +++ b/PCK-Studio/Properties/Resources.Designer.cs @@ -445,42 +445,6 @@ namespace PckStudio.Properties { } } - /// - /// Looks up a localized string similar to #version 330 core - /// - ///layout(location = 0) in vec4 a_Pos; - /// - ///uniform mat4 ViewProjection; - /// - ///void main() - ///{ - /// gl_Position = ViewProjection * a_Pos; - ///};. - /// - public static string lineFragmentShader { - get { - return ResourceManager.GetString("lineFragmentShader", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to #version 330 core - /// - ///layout(location = 0) out vec4 FragColor; - /// - ///uniform vec4 color; - /// - ///void main() - ///{ - /// FragColor = color; - ///}. - /// - public static string lineVertexShader { - get { - return ResourceManager.GetString("lineVertexShader", resourceCulture); - } - } - /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -591,6 +555,50 @@ namespace PckStudio.Properties { } } + /// + /// Looks up a localized string similar to #version 330 core + /// + ///layout(location = 0) out vec4 FragColor; + /// + ///uniform vec4 baseColor; + ///uniform float intensity; + /// + ///in vec4 color; + /// + ///void main() + ///{ + /// FragColor = vec4((color * baseColor).rgb, intensity); + ///}. + /// + public static string plainColorFragmentShader { + get { + return ResourceManager.GetString("plainColorFragmentShader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to #version 330 core + /// + ///layout(location = 0) in vec4 a_Pos; + ///layout(location = 1) in vec4 a_Color; + /// + ///uniform mat4 ViewProjection; + ///uniform mat4 Transform; + /// + ///out vec4 color; + /// + ///void main() + ///{ + /// color = a_Color; + /// gl_Position = ViewProjection * Transform * vec4(a_Pos.x, a_Pos.yz * -1.0, 1.0); + ///};. + /// + public static string plainColorVertexShader { + get { + return ResourceManager.GetString("plainColorVertexShader", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). /// @@ -746,7 +754,7 @@ namespace PckStudio.Properties { /// ///void main() ///{ - /// color = texture(skybox, texCoords) * vec4(vec3(clamp(brightness, 0.0, 1.0)), 1.0); + /// color = vec4(texture(skybox, texCoords).rgb * clamp(brightness, 0.0, 1.0), 1.0); ///}. /// public static string skyboxFragmentShader { diff --git a/PCK-Studio/Properties/Resources.resx b/PCK-Studio/Properties/Resources.resx index 39ecec81..7f0ab25d 100644 --- a/PCK-Studio/Properties/Resources.resx +++ b/PCK-Studio/Properties/Resources.resx @@ -352,10 +352,10 @@ ..\Resources\shader\framebufferVertexShader.glsl;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - - ..\Resources\shader\lineFragmentShader.glsl;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + + ..\Resources\shader\plainColorFragmentShader.glsl;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - - ..\Resources\shader\lineVertexShader.glsl;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + + ..\Resources\shader\plainColorVertexShader.glsl;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 \ No newline at end of file diff --git a/PCK-Studio/Rendering/SkinRenderer.cs b/PCK-Studio/Rendering/SkinRenderer.cs index d9de7cb5..8bba5e98 100644 --- a/PCK-Studio/Rendering/SkinRenderer.cs +++ b/PCK-Studio/Rendering/SkinRenderer.cs @@ -464,14 +464,14 @@ namespace PckStudio.Rendering GLErrorCheck(); } #endif - // Line Shader + // Plain color shader { - var lineShader = ShaderProgram.Create(Resources.lineVertexShader, Resources.lineFragmentShader); + var lineShader = ShaderProgram.Create(Resources.plainColorVertexShader, Resources.plainColorFragmentShader); lineShader.Bind(); lineShader.SetUniform4("baseColor", Color.WhiteSmoke); lineShader.SetUniform1("intensity", 0.5f); lineShader.Validate(); - _shaders.AddShader("LineShader", lineShader); + _shaders.AddShader("PlainColorShader", lineShader); Color lineColor = Color.White; @@ -860,7 +860,7 @@ namespace PckStudio.Rendering GL.DepthFunc(DepthFunction.Less); } - ShaderProgram lineShader = _shaders.GetShader("LineShader"); + ShaderProgram lineShader = _shaders.GetShader("PlainColorShader"); // Render (custom) skin { diff --git a/PCK-Studio/Resources/shader/lineFragmentShader.glsl b/PCK-Studio/Resources/shader/plainColorFragmentShader.glsl similarity index 100% rename from PCK-Studio/Resources/shader/lineFragmentShader.glsl rename to PCK-Studio/Resources/shader/plainColorFragmentShader.glsl diff --git a/PCK-Studio/Resources/shader/lineVertexShader.glsl b/PCK-Studio/Resources/shader/plainColorVertexShader.glsl similarity index 100% rename from PCK-Studio/Resources/shader/lineVertexShader.glsl rename to PCK-Studio/Resources/shader/plainColorVertexShader.glsl