Tweak floor normal map shading
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 703 B After Width: | Height: | Size: 5.9 KiB |
@@ -13,9 +13,10 @@ void main() {
|
|||||||
vec3 norm = normbit.xyz - pos;
|
vec3 norm = normbit.xyz - pos;
|
||||||
float y1 = dot(normalize(norm), normalize(distVec));
|
float y1 = dot(normalize(norm), normalize(distVec));
|
||||||
float y2 = float(y1 > 0 ? 1 : 0);
|
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 y = y2;
|
||||||
float y3 = clamp(0.5 * (y1 + 1),0,1) ;
|
|
||||||
float y = float(normbit.w == 0 ? y2 : y2);
|
|
||||||
float dist = dot(distVec, distVec);
|
float dist = dot(distVec, distVec);
|
||||||
if (dist > rad) {
|
if (dist > rad) {
|
||||||
discard;
|
discard;
|
||||||
|
|||||||
@@ -212,8 +212,7 @@ preloadRender = do
|
|||||||
, eslist
|
, eslist
|
||||||
]
|
]
|
||||||
initializeGLState
|
initializeGLState
|
||||||
|
tonormalmap <- initTexture 3 GL_LINEAR_MIPMAP_LINEAR GL_LINEAR "data/normalMaps/attachedPanel.png"
|
||||||
tonormalmap <- initTexture 3 GL_LINEAR_MIPMAP_LINEAR GL_LINEAR "data/normalMaps/squaresPattern.png"
|
|
||||||
return $
|
return $
|
||||||
RenderData
|
RenderData
|
||||||
{ _pictureShaders = shadV
|
{ _pictureShaders = shadV
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
module Shader.Poke.Floor where
|
module Shader.Poke.Floor
|
||||||
|
( pokeTile
|
||||||
|
) where
|
||||||
|
|
||||||
import Geometry
|
import Geometry
|
||||||
import Shader.Poke.Triangulate
|
import Shader.Poke.Triangulate
|
||||||
|
|||||||
Reference in New Issue
Block a user