-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest.glsl
More file actions
128 lines (95 loc) · 2.82 KB
/
Copy pathtest.glsl
File metadata and controls
128 lines (95 loc) · 2.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
// This is just a test input file for the shader parsing, the license is LGPL3 from Sodium/Embeddium.
uniform float framemod8;
// The position of the vertex around the model origin
vec3 _vert_position;
// The block texture coordinate of the vertex
vec2 _vert_tex_diffuse_coord, testing;
// The light texture coordinate of the vertex
ivec2 _vert_tex_light_coord;
// The color of the vertex
vec4 _vert_color;
// The index of the draw command which this vertex belongs to
uint _draw_id;
// The material bits for the primitive
uint _material_params;
#ifdef USE_VERTEX_COMPRESSION
in uvec4 a_PosId;
in vec4 a_Color;
in vec2 a_TexCoord;
in ivec2 a_LightCoord;
#if !defined(VERT_POS_SCALE)
#error "VERT_POS_SCALE not defined"
#elif !defined(VERT_POS_OFFSET)
#error "VERT_POS_OFFSET not defined"
#elif !defined(VERT_TEX_SCALE)
#error "VERT_TEX_SCALE not defined"
#endif
void _vert_init() {
_vert_position = (vec3(a_PosId.xyz) * VERT_POS_SCALE + VERT_POS_OFFSET);
_vert_tex_diffuse_coord = (a_TexCoord * VERT_TEX_SCALE);
_vert_tex_light_coord = a_LightCoord;
_vert_color = a_Color;
_draw_id = (a_PosId.w >> 8u) & 0xFFu;
_material_params = (a_PosId.w >> 0u) & 0xFFu;
}
#else
in vec3 a_PosId, a_PosId2;
in vec4 a_Color;
in vec2 a_TexCoord;
in uint a_LightCoord;
out VertexData {
vec2 coord;
vec4 color;
} fsh;
void _vert_init(const vec2 vector) {
const vec2 storagetest = vector;
const vec2 test2 = vector;
_vert_position = a_PosId;
_vert_tex_diffuse_coord = a_TexCoord;
_vert_color = a_Color;
uint packed_draw_params = (a_LightCoord & 0xFFFFu);
// Vertex Material
_material_params = (packed_draw_params) & 0xFFu;
// Vertex Mesh ID
_draw_id = (packed_draw_params >> 8) & 0xFFu;
test[5] = function(uvec2(ivec2(0),8), uvec2(0)).x;
// Vertex Light
_vert_tex_light_coord = ivec2((uvec2((a_LightCoord >> 16) & 0xFFFFu) >> uvec2(0, 8)) & uvec2(0xFFu));
}
vec4 texture2D_POMSwitch(sampler2D textures2D,
vec2 lightmapCoord,
vec4 dcdxdcdy,
bool ifPOM
) {
}
void main() {
if (vartest == test) {
test = 4;
}
const float test = _vert_init(vec2(1,1));
if (vartest > gl_TextureMatrix[0][3]) {
test = 4;
}
if (vartest > test2[5]) {
test = 4;
}
if (vartest == uint(5)) {
test = 4;
}
if (test == vartest.xy) {
}
if (test == vec4(_vert_tex_diffuse_coord, 0.0, 1.0).xy) {
}
shadowCol = texture2D ( shadowcolor0 , shadowPos . st );
_vert_init();
}
void removeMe() {
}
uniform sampler2D twodimsampler;
void myTestFunctionWithTex2D() {
vec2 vec = vec2(0.05, 0.05);
float myothertest = someRandomFunc(twodimsampler, vec).r;
float mytest = texture2D(twodimsampler, vec).r;
float value = pow2(texture2D(twodimsampler, vec).r * pow1_5(texture2D(twodimsampler, vec * 0.5).r));
}
#endif