space
@@ -313,3 +313,4 @@
|
||||
63423=memory-bank|block-memory-bank-medium
|
||||
63422=foreshadow|block-foreshadow-medium
|
||||
63421=tsunami|block-tsunami-medium
|
||||
63420=space|block-space-medium
|
||||
|
||||
23
core/assets/shaders/space.frag
Executable file
@@ -0,0 +1,23 @@
|
||||
#define HIGHP
|
||||
#define NSCALE 2000.0
|
||||
#define CAMSCALE (NSCALE*1.1)
|
||||
|
||||
uniform sampler2D u_texture;
|
||||
uniform sampler2D u_stars;
|
||||
|
||||
uniform vec2 u_campos;
|
||||
uniform vec2 u_ccampos;
|
||||
uniform vec2 u_resolution;
|
||||
uniform float u_time;
|
||||
|
||||
varying vec2 v_texCoords;
|
||||
|
||||
void main(){
|
||||
vec2 c = v_texCoords.xy;
|
||||
vec2 coords = vec2(c.x * u_resolution.x + u_campos.x, c.y * u_resolution.y + u_campos.y);
|
||||
|
||||
vec4 color = texture2D(u_texture, c);
|
||||
color.rgb = texture2D(u_stars, coords / NSCALE + vec2(0.5, 0.3) - u_ccampos / CAMSCALE);
|
||||
|
||||
gl_FragColor = color;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 819 B After Width: | Height: | Size: 825 B |
|
Before Width: | Height: | Size: 185 KiB After Width: | Height: | Size: 188 KiB |
|
Before Width: | Height: | Size: 326 KiB After Width: | Height: | Size: 333 KiB |
|
Before Width: | Height: | Size: 428 KiB After Width: | Height: | Size: 429 KiB |
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 189 KiB |
|
Before Width: | Height: | Size: 314 KiB After Width: | Height: | Size: 331 KiB |
|
Before Width: | Height: | Size: 426 KiB After Width: | Height: | Size: 426 KiB |
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |