Просмотр исходного кода

StorageTextureNode: Bypass UV matrix transforms (#33545)

thelazylama 3 недель назад
Родитель
Сommit
fea7baf61a
1 измененных файлов с 14 добавлено и 0 удалено
  1. 14 0
      src/nodes/accessors/StorageTextureNode.js

+ 14 - 0
src/nodes/accessors/StorageTextureNode.js

@@ -99,6 +99,20 @@ class StorageTextureNode extends TextureNode {
 
 	}
 
+	/**
+	 * Overwrites the default implementation since storage texture
+	 * coordinates are texel coordinates and should not be transformed
+	 * by the texture uv matrix.
+	 *
+	 * @param {Node} uvNode - The uv node.
+	 * @return {Node} The unmodified uv node.
+	 */
+	getTransformedUV( uvNode ) {
+
+		return uvNode;
+
+	}
+
 	setup( builder ) {
 
 		super.setup( builder );

粤ICP备19079148号