Переглянути джерело

Revert a75a2fdc9b6466d54b66b20ce309d7fc16c9dd9f for h3d.shader.VolumeDecal.hx

clementlandrin 2 роки тому
батько
коміт
ebb7a63ede
1 змінених файлів з 1 додано та 5 видалено
  1. 1 5
      h3d/shader/VolumeDecal.hx

+ 1 - 5
h3d/shader/VolumeDecal.hx

@@ -20,7 +20,7 @@ class VolumeDecal extends hxsl.Shader {
 			transformedTangent = vec4((tangent * global.modelView.mat3()).normalize(),1.);
 		}
 
-		function __init__fragment() {
+		function fragment() {
 			var matrix = camera.inverseViewProj * global.modelViewInverse;
 			var screenPos = projectedPosition.xy / projectedPosition.w;
 			var ruv = vec4(
@@ -32,10 +32,6 @@ class VolumeDecal extends hxsl.Shader {
 			var ppos = ruv * camera.inverseViewProj;
 			pixelTransformedPosition = ppos.xyz / ppos.w;
 			calculatedUV = scale * (wpos.xy / wpos.w);
-		}
-
-		function fragment() {
-			
 			if( isCentered ) calculatedUV += 0.5;
 			if( min(min(calculatedUV.x, calculatedUV.y), min(1 - calculatedUV.x, 1 - calculatedUV.y)) < 0 )
 				discard;