Tweak floor normal map shading

This commit is contained in:
2023-03-18 14:41:07 +00:00
parent c6120f2fc9
commit 6461535579
4 changed files with 7 additions and 5 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 703 B

After

Width:  |  Height:  |  Size: 5.9 KiB

+3 -2
View File
@@ -13,9 +13,10 @@ void main() {
vec3 norm = normbit.xyz - pos;
float y1 = dot(normalize(norm), normalize(distVec));
float y2 = float(y1 > 0 ? 1 : 0);
//float y3 = clamp(0.5 * (y1 + 1),0,1) ;
float y3 = clamp(y1 + 1,0,1) ;
float y = float(normbit.w == 0 ? y3 : y2);
//float y = y2;
float y3 = clamp(0.5 * (y1 + 1),0,1) ;
float y = float(normbit.w == 0 ? y2 : y2);
float dist = dot(distVec, distVec);
if (dist > rad) {
discard;
+1 -2
View File
@@ -212,8 +212,7 @@ preloadRender = do
, eslist
]
initializeGLState
tonormalmap <- initTexture 3 GL_LINEAR_MIPMAP_LINEAR GL_LINEAR "data/normalMaps/squaresPattern.png"
tonormalmap <- initTexture 3 GL_LINEAR_MIPMAP_LINEAR GL_LINEAR "data/normalMaps/attachedPanel.png"
return $
RenderData
{ _pictureShaders = shadV
+3 -1
View File
@@ -1,4 +1,6 @@
module Shader.Poke.Floor where
module Shader.Poke.Floor
( pokeTile
) where
import Geometry
import Shader.Poke.Triangulate