added Normal.glsl BlinnPhongPureColor.mtl
This commit is contained in:
parent
8a5711154f
commit
737438aaed
9
ShaderLibrary/Normal.glsl
Normal file
9
ShaderLibrary/Normal.glsl
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
mat3 GetNormalMatrix()
|
||||||
|
{
|
||||||
|
return mat3(camera.view*GetLocalToWorld());
|
||||||
|
}
|
||||||
|
|
||||||
|
vec3 GetNormal(mat3 normal_matrix,vec3 normal)
|
||||||
|
{
|
||||||
|
return normalize(normal_matrix*normal);
|
||||||
|
}
|
32
ShaderLibrary/Std3D/BlinnPhongPureColor.mtl
Normal file
32
ShaderLibrary/Std3D/BlinnPhongPureColor.mtl
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
#Material
|
||||||
|
Name Blinn-phong shading model only color
|
||||||
|
Base Std3D
|
||||||
|
|
||||||
|
Require LocalToWorld,Camera,Sun
|
||||||
|
|
||||||
|
#MaterialInstance
|
||||||
|
|
||||||
|
Code
|
||||||
|
{
|
||||||
|
float Diffuse;
|
||||||
|
float Intensity;
|
||||||
|
}
|
||||||
|
|
||||||
|
#VertexInput
|
||||||
|
vec3 Normal
|
||||||
|
|
||||||
|
#Vertex
|
||||||
|
Output
|
||||||
|
{
|
||||||
|
vec3 Normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
Code
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
gl_Position=GetPosition3D();
|
||||||
|
}
|
||||||
|
|
||||||
|
#Fragment
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user