Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/textures/newb/cloud_texture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/textures/newb/noise_texture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions src/materials/Actor/buffers/NoiseTexture.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "NoiseTexture",
"reg1": 10,
"reg2": 10,
"type": "texture2D",
"precision": "lowp",
"access": "readonly",
"texture_format": "",
"default_texture": "",
"unordered_access": false,
"always_one": 1,
"unknown_string": "textures/newb/noise_texture",
"sampler_state": {
"filter": "Bilinear",
"wrapping": "Repeat"
},
"custom_type_info": {}
}
18 changes: 18 additions & 0 deletions src/materials/ActorGlint/buffers/NoiseTexture.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "NoiseTexture",
"reg1": 10,
"reg2": 10,
"type": "texture2D",
"precision": "lowp",
"access": "readonly",
"texture_format": "",
"default_texture": "",
"unordered_access": false,
"always_one": 1,
"unknown_string": "textures/newb/noise_texture",
"sampler_state": {
"filter": "Bilinear",
"wrapping": "Repeat"
},
"custom_type_info": {}
}
18 changes: 18 additions & 0 deletions src/materials/Clouds/buffers/CloudTexture.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "CloudTexture",
"reg1": 11,
"reg2": 11,
"type": "texture2D",
"precision": "lowp",
"access": "readonly",
"texture_format": "",
"default_texture": "",
"unordered_access": false,
"always_one": 1,
"unknown_string": "textures/newb/cloud_texture",
"sampler_state": {
"filter": "Point",
"wrapping": "Repeat"
},
"custom_type_info": {}
}
18 changes: 18 additions & 0 deletions src/materials/Clouds/buffers/NoiseTexture.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "NoiseTexture",
"reg1": 10,
"reg2": 10,
"type": "texture2D",
"precision": "lowp",
"access": "readonly",
"texture_format": "",
"default_texture": "",
"unordered_access": false,
"always_one": 1,
"unknown_string": "textures/newb/noise_texture",
"sampler_state": {
"filter": "Bilinear",
"wrapping": "Repeat"
},
"custom_type_info": {}
}
6 changes: 4 additions & 2 deletions src/materials/Clouds/fragment.sc
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,22 @@ $input v_color0

#define NL_CLOUD_PARAMS(x) NL_CLOUD2##x##STEPS, NL_CLOUD2##x##THICKNESS, NL_CLOUD2##x##RAIN_THICKNESS, NL_CLOUD2##x##VELOCITY, NL_CLOUD2##x##SCALE, NL_CLOUD2##x##DENSITY, NL_CLOUD2##x##SHAPE

SAMPLER2D_AUTOREG(s_CloudTexture);

void main() {
vec4 color = v_color0;

#if NL_CLOUD_TYPE >= 2
vec3 vDir = normalize(v_color0.xyz);

#if NL_CLOUD_TYPE == 2
color = renderCloudsRounded(vDir, v_color0.xyz, v_color1.w, v_color2.w, v_color2.rgb, v_color1.rgb, NL_CLOUD_PARAMS(_));
color = renderCloudsRounded(s_CloudTexture, vDir, v_color0.xyz, v_color1.w, v_color2.w, v_color2.rgb, v_color1.rgb, NL_CLOUD_PARAMS(_));

#ifdef NL_CLOUD2_LAYER2
vec2 parallax = vDir.xz / abs(vDir.y) * NL_CLOUD2_LAYER2_OFFSET;
vec3 offsetPos = v_color0.xyz;
offsetPos.xz += parallax;
vec4 color2 = renderCloudsRounded(vDir, offsetPos, v_color1.a, v_color2.a*2.0, v_color2.rgb, v_color1.rgb, NL_CLOUD_PARAMS(_LAYER2_));
vec4 color2 = renderCloudsRounded(s_CloudTexture, vDir, offsetPos, v_color1.a, v_color2.a*2.0, v_color2.rgb, v_color1.rgb, NL_CLOUD_PARAMS(_LAYER2_));
color = mix(color2, color, 0.2 + 0.8*color.a);
#endif

Expand Down
18 changes: 18 additions & 0 deletions src/materials/EndSky/buffers/NoiseTexture.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "NoiseTexture",
"reg1": 10,
"reg2": 10,
"type": "texture2D",
"precision": "lowp",
"access": "readonly",
"texture_format": "",
"default_texture": "",
"unordered_access": false,
"always_one": 1,
"unknown_string": "textures/newb/noise_texture",
"sampler_state": {
"filter": "Bilinear",
"wrapping": "Repeat"
},
"custom_type_info": {}
}
18 changes: 18 additions & 0 deletions src/materials/ItemInHandColor/buffers/NoiseTexture.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "NoiseTexture",
"reg1": 10,
"reg2": 10,
"type": "texture2D",
"precision": "lowp",
"access": "readonly",
"texture_format": "",
"default_texture": "",
"unordered_access": false,
"always_one": 1,
"unknown_string": "textures/newb/noise_texture",
"sampler_state": {
"filter": "Bilinear",
"wrapping": "Repeat"
},
"custom_type_info": {}
}
18 changes: 18 additions & 0 deletions src/materials/ItemInHandColorGlint/buffers/NoiseTexture.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "NoiseTexture",
"reg1": 10,
"reg2": 10,
"type": "texture2D",
"precision": "lowp",
"access": "readonly",
"texture_format": "",
"default_texture": "",
"unordered_access": false,
"always_one": 1,
"unknown_string": "textures/newb/noise_texture",
"sampler_state": {
"filter": "Bilinear",
"wrapping": "Repeat"
},
"custom_type_info": {}
}
18 changes: 18 additions & 0 deletions src/materials/ItemInHandTextured/buffers/NoiseTexture.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "NoiseTexture",
"reg1": 10,
"reg2": 10,
"type": "texture2D",
"precision": "lowp",
"access": "readonly",
"texture_format": "",
"default_texture": "",
"unordered_access": false,
"always_one": 1,
"unknown_string": "textures/newb/noise_texture",
"sampler_state": {
"filter": "Bilinear",
"wrapping": "Repeat"
},
"custom_type_info": {}
}
18 changes: 18 additions & 0 deletions src/materials/LegacyCubemap/buffers/NoiseTexture.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "NoiseTexture",
"reg1": 10,
"reg2": 10,
"type": "texture2D",
"precision": "lowp",
"access": "readonly",
"texture_format": "",
"default_texture": "",
"unordered_access": false,
"always_one": 1,
"unknown_string": "textures/newb/noise_texture",
"sampler_state": {
"filter": "Bilinear",
"wrapping": "Repeat"
},
"custom_type_info": {}
}
18 changes: 18 additions & 0 deletions src/materials/RenderChunk/buffers/NoiseTexture.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "NoiseTexture",
"reg1": 10,
"reg2": 10,
"type": "texture2D",
"precision": "lowp",
"access": "readonly",
"texture_format": "",
"default_texture": "",
"unordered_access": false,
"always_one": 1,
"unknown_string": "textures/newb/noise_texture",
"sampler_state": {
"filter": "Bilinear",
"wrapping": "Repeat"
},
"custom_type_info": {}
}
18 changes: 18 additions & 0 deletions src/materials/Sky/buffers/NoiseTexture.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "NoiseTexture",
"reg1": 10,
"reg2": 10,
"type": "texture2D",
"precision": "lowp",
"access": "readonly",
"texture_format": "",
"default_texture": "",
"unordered_access": false,
"always_one": 1,
"unknown_string": "textures/newb/noise_texture",
"sampler_state": {
"filter": "Bilinear",
"wrapping": "Repeat"
},
"custom_type_info": {}
}
18 changes: 18 additions & 0 deletions src/materials/Stars/buffers/NoiseTexture.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "NoiseTexture",
"reg1": 10,
"reg2": 10,
"type": "texture2D",
"precision": "lowp",
"access": "readonly",
"texture_format": "",
"default_texture": "",
"unordered_access": false,
"always_one": 1,
"unknown_string": "textures/newb/noise_texture",
"sampler_state": {
"filter": "Bilinear",
"wrapping": "Repeat"
},
"custom_type_info": {}
}
18 changes: 18 additions & 0 deletions src/materials/SunMoon/buffers/NoiseTexture.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "NoiseTexture",
"reg1": 10,
"reg2": 10,
"type": "texture2D",
"precision": "lowp",
"access": "readonly",
"texture_format": "",
"default_texture": "",
"unordered_access": false,
"always_one": 1,
"unknown_string": "textures/newb/noise_texture",
"sampler_state": {
"filter": "Bilinear",
"wrapping": "Repeat"
},
"custom_type_info": {}
}
18 changes: 18 additions & 0 deletions src/materials/Weather/buffers/NoiseTexture.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "NoiseTexture",
"reg1": 10,
"reg2": 10,
"type": "texture2D",
"precision": "lowp",
"access": "readonly",
"texture_format": "",
"default_texture": "",
"unordered_access": false,
"always_one": 1,
"unknown_string": "textures/newb/noise_texture",
"sampler_state": {
"filter": "Bilinear",
"wrapping": "Repeat"
},
"custom_type_info": {}
}
1 change: 1 addition & 0 deletions src/materials/Weather/fragment.sc
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ void main() {
diffuse.rgb = colorCorrection(diffuse.rgb);

diffuse.a *= lightingUV.y*(1.0-v_fog.a);
diffuse.a *= NL_WEATHER_PARTICLE_OPACITY;

gl_FragColor = diffuse;
}
Expand Down
9 changes: 5 additions & 4 deletions src/newb/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
#define NL_CLOUD2_SCALE vec2(0.033, 0.033) // 0.003 large ~ 0.3 tiny
#define NL_CLOUD2_SHAPE vec2(0.5, 0.4) // 0.0 round ~ 1.0 box vec2(horizontal shape, vertical shape)
#define NL_CLOUD2_DENSITY 25.0 // 1.0 blurry ~ 100.0 sharp
#define NL_CLOUD2_VELOCITY 0.8 // 0.0 static ~ 4.0 very fast
#define NL_CLOUD2_VELOCITY 0.9 // 0.0 static ~ 4.0 very fast
//#define NL_CLOUD2_LAYER2 // [toggle] extra cloud layer
#define NL_CLOUD2_LAYER2_OFFSET 143.0 // 30.0 near ~ 300.0 very high
#define NL_CLOUD2_LAYER2_THICKNESS 2.5 // 0.7 slim ~ 5.0 fat
Expand All @@ -146,11 +146,11 @@
#define NL_CLOUD2_LAYER2_SCALE vec2(0.03, 0.03) // 0.003 large ~ 0.3 tiny
#define NL_CLOUD2_LAYER2_SHAPE vec2(0.5, 0.4) // 0.0 round ~ 1.0 box vec2(horizontal shape, vertical shape)
#define NL_CLOUD2_LAYER2_DENSITY 25.0 // 1.0 blurry ~ 100.0 sharp
#define NL_CLOUD2_LAYER2_VELOCITY 0.8 // 0.0 static ~ 4.0 very fast
#define NL_CLOUD2_LAYER2_VELOCITY 0.9 // 0.0 static ~ 4.0 very fast

/* Realistic cloud settings */
#define NL_CLOUD3_SCALE vec2(0.03, 0.03) // 0.003 large ~ 1.0 tiny
#define NL_CLOUD3_SPEED 0.005 // 0.0 static ~ 4.0 fast moving
#define NL_CLOUD3_SCALE vec2(0.03, 0.03) // 0.007 large ~ 0.5 tiny
#define NL_CLOUD3_SPEED 0.01 // 0.0 static ~ 1.0 fast moving
#define NL_CLOUD3_SHADOW 0.9 // 0.1 subtle ~ 1.0 dark
#define NL_CLOUD3_SHADOW_OFFSET 0.3 // 0.05 minimal ~ 1.0 large

Expand Down Expand Up @@ -198,6 +198,7 @@
#define NL_WEATHER_SPECK 0.6 // [toggle] 0.0 vanilla texture ~ 1.0 soft speck
#define NL_WEATHER_RAIN_SLANT 4.0 // 1.0 minimal ~ 8.0 violent
#define NL_WEATHER_PARTICLE_SIZE 1.0 // 0.5 tiny ~ 4.0 large
#define NL_WEATHER_PARTICLE_OPACITY 0.5 // 0.0 invisible ~ 1.0 opaque

/* Lava effects */
#define NL_LAVA_NOISE // [toggle] darken lava in certain regions
Expand Down
Loading