UvToScreen.hx 397 B

123456789101112131415161718192021222324
  1. package hrt.shgraph.nodes;
  2. using hxsl.Ast;
  3. @name("UV To Screen")
  4. @description("")
  5. @width(100)
  6. @group("Math")
  7. class UvToScreen extends ShaderFunction {
  8. @input("UV") var uv = SType.Vec2;
  9. public function new() {
  10. super(UvToScreen);
  11. }
  12. override public function computeOutputs() {
  13. if (uv != null && !uv.isEmpty())
  14. addOutput("output", uv.getType());
  15. else
  16. removeOutput("output");
  17. }
  18. }