vertex_fragment_expected_full.glsl 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /* WARNING, THIS FILE WAS GENERATED, DO NOT EDIT */
  2. #ifndef VERTEX_FRAGMENT_GLSL_GEN_HGLES3_GLES3
  3. #define VERTEX_FRAGMENT_GLSL_GEN_HGLES3_GLES3
  4. #include "drivers/gles3/shader_gles3.h"
  5. class VertexFragmentShaderGLES3 : public ShaderGLES3 {
  6. public:
  7. enum ShaderVariant {
  8. MODE_NINEPATCH,
  9. };
  10. enum Specializations {
  11. DISABLE_LIGHTING=1,
  12. };
  13. _FORCE_INLINE_ bool version_bind_shader(RID p_version,ShaderVariant p_variant,uint64_t p_specialization=0) { return _version_bind_shader(p_version,p_variant,p_specialization); }
  14. protected:
  15. virtual void _init() override {
  16. static const char **_uniform_strings=nullptr;
  17. static const char* _variant_defines[]={
  18. "#define USE_NINEPATCH",
  19. };
  20. static TexUnitPair *_texunit_pairs=nullptr;
  21. static UBOPair *_ubo_pairs=nullptr;
  22. static Specialization _spec_pairs[]={
  23. {"DISABLE_LIGHTING",false},
  24. };
  25. static const Feedback* _feedbacks=nullptr;
  26. static const char _vertex_code[]={
  27. R"<!>(
  28. precision highp float;
  29. precision highp int;
  30. layout(location = 0) in highp vec3 vertex;
  31. out highp vec4 position_interp;
  32. void main() {
  33. position_interp = vec4(vertex.x,1,0,1);
  34. }
  35. )<!>"
  36. };
  37. static const char _fragment_code[]={
  38. R"<!>(
  39. precision highp float;
  40. precision highp int;
  41. in highp vec4 position_interp;
  42. void main() {
  43. highp float depth = ((position_interp.z / position_interp.w) + 1.0);
  44. frag_color = vec4(depth);
  45. }
  46. )<!>"
  47. };
  48. _setup(_vertex_code,_fragment_code,"VertexFragmentShaderGLES3",0,_uniform_strings,0,_ubo_pairs,0,_feedbacks,0,_texunit_pairs,1,_spec_pairs,1,_variant_defines);
  49. }
  50. };
  51. #endif