Browse Source

add noInterpolation hlsl keyword when a var is qualified as @flat to behave as glsl and its flat output.

borisrp 5 months ago
parent
commit
3a11d7f51b
1 changed files with 2 additions and 0 deletions
  1. 2 0
      hxsl/HlslOut.hx

+ 2 - 0
hxsl/HlslOut.hx

@@ -225,6 +225,8 @@ class HlslOut {
 			add('> ');
 			ident(v);
 		default:
+			if ( Tools.hasQualifier(v, Flat) )
+				add("nointerpolation ");
 			addType(v.type);
 			add(" ");
 			ident(v);