本文整理汇总了C#中ShadingState.getShader方法的典型用法代码示例。如果您正苦于以下问题:C# ShadingState.getShader方法的具体用法?C# ShadingState.getShader怎么用?C# ShadingState.getShader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShadingState
的用法示例。
在下文中一共展示了ShadingState.getShader方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: getGlobalRadiance
public Color getGlobalRadiance(ShadingState state)
{
if (globalPhotonMap == null)
{
if (state.getShader() != null)
return state.getShader().getRadiance(state);
else
return Color.BLACK;
}
else
return globalPhotonMap.getRadiance(state.getPoint(), state.getNormal());
}
示例2: GetRadiance
public Color GetRadiance(ShadingState state)
{
if (state.getNormal() == null)
{
// if this shader has been applied to an infinite instance because of shader overrides
// run the default shader, otherwise, just shade black
return state.getShader() != this ? state.getShader().GetRadiance(state) : Color.BLACK;
}
// make sure we are on the right side of the material
state.faceforward();
// setup lighting
state.initLightSamples();
state.initCausticSamples();
return state.diffuse(Color.GRAY);
}
示例3: getShader
private IShader getShader(ShadingState state)
{
return shaderOverride != null ? shaderOverride : state.getShader();
}
示例4: getPhotonShader
private IShader getPhotonShader(ShadingState state)
{
return (shaderOverride != null && shaderOverridePhotons) ? shaderOverride : state.getShader();
}
示例5: getFillColor
public override Color getFillColor(ShadingState state)
{
return ambocc ? state.occlusion(16, 6.0f) : state.getShader().getRadiance(state);
}
示例6: set
public void set(ShadingState state)
{
if (state == null)
c = Color.BLACK;
else
{
c = state.getResult();
shader = state.getShader();
instance = state.getInstance();
if (state.getNormal() != null)
{
nx = state.getNormal().x;
ny = state.getNormal().y;
nz = state.getNormal().z;
}
alpha = state.getInstance() == null ? 0 : 1;
}
n = 1;
}