don't clip below base of the oriel
This commit is contained in:
parent
231ee8ac2a
commit
da60fefad8
1 changed files with 4 additions and 7 deletions
|
@ -96,13 +96,10 @@ psOut ps(psIn input) {
|
||||||
float t = 1 - (1 + dot(input.normal, _light)) / 2;
|
float t = 1 - (1 + dot(input.normal, _light)) / 2;
|
||||||
o.color = float4(o.color.rgb * t, 1);
|
o.color = float4(o.color.rgb * t, 1);
|
||||||
|
|
||||||
|
// float3 localPos = mul(float4(input.world, 1), _matrix).xyz;
|
||||||
// backface
|
// if (localPos.y < -_dimensions.y / 2) {
|
||||||
float3 localPos = mul(float4(input.world, 1), _matrix).xyz;
|
// clip(-1);
|
||||||
|
// }
|
||||||
if (localPos.y < -_dimensions.y / 2) {
|
|
||||||
clip(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dot(direction, input.normal) > 0) {
|
if (dot(direction, input.normal) > 0) {
|
||||||
o.color = float4(0.5, 0.5, 0.5, 1);
|
o.color = float4(0.5, 0.5, 0.5, 1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue