Init
This commit is contained in:
@ -0,0 +1,24 @@
|
||||
|
||||
#include <phong_lighting.cg>
|
||||
#include <fragment_entry.cg>
|
||||
|
||||
BEGIN_CBUFFER(cbDiffuse)
|
||||
CONST_TYPE float3 diffuseColor;
|
||||
END_CBUFFER(cbDiffuse)
|
||||
|
||||
DECLARE_TEXTURE(diffuseTexture)
|
||||
|
||||
SurfaceMaterial computeSurfaceMaterial(const FragmentParameters params)
|
||||
{
|
||||
half4 diffuseTextureColor = tex2D(diffuseTexture, params.texcoord0.xy);
|
||||
|
||||
SurfaceMaterial mout;
|
||||
mout.diffuseColor = diffuseTextureColor.rgb * diffuseColor;
|
||||
// mout.diffuseColor = diffuseColor;
|
||||
mout.alpha = 1.0;
|
||||
mout.emissiveColor = 0;
|
||||
mout.specularColor = half3(0.2,0.2,0.2); // TODO: make this a constant parameter set by the material.
|
||||
mout.specularPower = 16;
|
||||
mout.tangentSpaceNormal = half3(0,0,1);
|
||||
return mout;
|
||||
}
|
||||
Reference in New Issue
Block a user