scene.vert 908 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* scene.vs -- Contains everything for custom user scene vertex shader
  2. *
  3. * Copyright (c) 2025-2026 Le Juez Victor
  4. *
  5. * This software is provided 'as-is', without any express or implied warranty.
  6. * For conditions of distribution and use, see accompanying LICENSE file.
  7. */
  8. vec3 POSITION;
  9. vec2 TEXCOORD;
  10. vec3 EMISSION;
  11. vec4 COLOR;
  12. vec4 TANGENT;
  13. vec3 NORMAL;
  14. vec3 INSTANCE_POSITION;
  15. vec4 INSTANCE_ROTATION;
  16. vec3 INSTANCE_SCALE;
  17. vec4 INSTANCE_COLOR;
  18. vec4 INSTANCE_CUSTOM;
  19. #define vertex()
  20. void SceneVertex()
  21. {
  22. INSTANCE_POSITION = iPosition;
  23. INSTANCE_ROTATION = iRotation;
  24. INSTANCE_SCALE = iScale;
  25. INSTANCE_COLOR = iColor;
  26. INSTANCE_CUSTOM = iCustom;
  27. POSITION = aPosition;
  28. TEXCOORD = uTexCoordOffset + aTexCoord * uTexCoordScale;
  29. EMISSION = uEmissionColor * uEmissionEnergy;
  30. COLOR = aColor * uAlbedoColor;
  31. TANGENT = aTangent;
  32. NORMAL = aNormal;
  33. vertex();
  34. }