vg_tex2d tex_tile_data = { .path = "textures/tileset.qoi" };
vg_tex2d tex_tile_detail = { .path = "textures/tile_overlays.qoi" };
vg_tex2d tex_wood = { .path = "textures/wood.qoi" };
-vg_tex2d tex_ball = { .path = "textures/ball.qoi", .flags = VG_TEXTURE_CLAMP };
vg_tex2d tex_background = { .path = "textures/background.qoi" };
vg_tex2d tex_ball_noise = { .path = "textures/bnoise.qoi" };
-vg_tex2d *texture_list[] = { &tex_tile_detail, &tex_tile_data, &tex_wood, &tex_ball, &tex_background, &tex_ball_noise };
+vg_tex2d *texture_list[] = { &tex_tile_detail, &tex_tile_data, &tex_wood, &tex_background, &tex_ball_noise };
// AUDIO
// ===========================================================================================================
UNIFORMS({ "uPv", "uOffset", "uColour" })
)
-/*
-SHADER_DEFINE( shader_ball,
- // VERTEX
- "layout (location=0) in vec2 a_co;"
- "uniform vec2 uOffset;"
- "uniform mat3 uPv;"
- ""
- "out vec2 aTexCoords;"
- ""
- "void main()"
- "{"
- // Create texture coords
- "aTexCoords = a_co;"
-
- // Vertex transform
- "vec3 worldpos = vec3( a_co * 0.5 - 0.25 + uOffset, 1.0 );"
- "gl_Position = vec4( uPv * worldpos, 1.0 );"
- "}",
-
- // FRAGMENT
- "out vec4 FragColor;"
- ""
- "uniform sampler2D uTexMain;"
- "uniform vec3 uColour;"
- ""
- "in vec2 aTexCoords;"
- ""
- "void main()"
- "{"
- "vec4 glyph = texture( uTexMain, aTexCoords );"
- "FragColor = vec4( uColour + glyph.rgb * 0.2, glyph.a );"
- "}"
- ,
- UNIFORMS({ "uTexMain", "uColour", "uOffset", "uPv" })
-)
-*/
-
SHADER_DEFINE( shader_ball,
// VERTEX
"layout (location=0) in vec2 a_co;"
"vec2 shadow_coords = center_coords + vec2(0.02,0.07);"
"vec2 shadow_coords_sqr = shadow_coords*shadow_coords;"
- //"float shadow = exp(-abs(shadow_coords_sqr.x+shadow_coords_sqr.y)*20.0);"
"float shadow = exp(-((shadow_coords_sqr.x+shadow_coords_sqr.y)-0.0125)*15.0);"
"vec3 marble_comp = uColour*0.9 + (noise_sample.x*0.7+pow(rim_light,3.0)*2.0) * 0.1;"