sand alpha, addon reg
authorhgn <hgodden00@gmail.com>
Mon, 1 Apr 2024 20:59:03 +0000 (21:59 +0100)
committerhgn <hgodden00@gmail.com>
Mon, 1 Apr 2024 20:59:03 +0000 (21:59 +0100)
shaders/scene_terrain.fs
skaterift.c
skaterift_blender/sr_main.py

index b60c8d219dfacdac450814f4b97ffe5a314349ac..47a98892cd15fb76e89e14ac2643bcb2fe5c3ea9 100644 (file)
@@ -1,7 +1,7 @@
 uniform sampler2D uTexGarbage;
 uniform sampler2D uTexGradients;
 uniform vec3 uCamera;
 uniform sampler2D uTexGarbage;
 uniform sampler2D uTexGradients;
 uniform vec3 uCamera;
-uniform vec3 uSandColour;
+uniform vec4 uSandColour;
 uniform vec2 uBlendOffset;
 
 #include "light_clearskies_stddef.glsl"
 uniform vec2 uBlendOffset;
 
 #include "light_clearskies_stddef.glsl"
@@ -36,7 +36,7 @@ void main()
    float amtsand = clamp( max((aCo.y - 10.0) * -0.1,0.0)*qnorm.y, 0.0, 1.0 );
    vec2 uvgradients = aUv + vec2( amtgrass + rgarbage.a*0.8 )*uBlendOffset;
    vfrag = texture( uTexGradients, uvgradients ).rgb;
    float amtsand = clamp( max((aCo.y - 10.0) * -0.1,0.0)*qnorm.y, 0.0, 1.0 );
    vec2 uvgradients = aUv + vec2( amtgrass + rgarbage.a*0.8 )*uBlendOffset;
    vfrag = texture( uTexGradients, uvgradients ).rgb;
-   vfrag = mix( vfrag, uSandColour, amtsand );
+   vfrag = mix( vfrag, uSandColour.rgb, amtsand*uSandColour.a );
    qnorm = mix( qnorm, aNorm.xyz, amtsand );
    
    if( g_light_preview == 1 )
    qnorm = mix( qnorm, aNorm.xyz, amtsand );
    
    if( g_light_preview == 1 )
index 8543f6a4e864566749d6e1cf39b830fa8ca35e08..0b223bab29d739c1aec45c8df18a6289d631fb57 100644 (file)
@@ -178,6 +178,8 @@ static void skaterift_load_world_content(void){
          ADDON_REG_MTZERO|ADDON_REG_PREMIUM );
    skaterift_mount_world_unloadable( "maps/dev_tutorial", 0 );
    skaterift_mount_world_unloadable( "maps/dev_flatworld", 0 );
          ADDON_REG_MTZERO|ADDON_REG_PREMIUM );
    skaterift_mount_world_unloadable( "maps/dev_tutorial", 0 );
    skaterift_mount_world_unloadable( "maps/dev_flatworld", 0 );
+   skaterift_mount_world_unloadable( "maps/mp_line1", 
+         ADDON_REG_MTZERO|ADDON_REG_PREMIUM );
 
    world_static.load_state = k_world_loader_load;
 
 
    world_static.load_state = k_world_loader_load;
 
index b715493167463135e4af8e39ea7f1c0691281261..fb20636dc283bf8605da33368d5dcc86eec42c92 100644 (file)
@@ -3613,8 +3613,8 @@ class SR_MATERIAL_PROPERTIES(bpy.types.PropertyGroup):
    sand_colour: bpy.props.FloatVectorProperty( \
          name="Sand Colour",\
          subtype='COLOR',\
    sand_colour: bpy.props.FloatVectorProperty( \
          name="Sand Colour",\
          subtype='COLOR',\
-         min=0.0,max=1.0,\
-         default=Vector((0.79,0.63,0.48)),\
+         min=0.0,max=1.0,size=4,\
+         default=Vector((0.79,0.63,0.48,1.0)),\
          description="Blend to this colour near the 0 coordinate on UP axis"\
    )
    shore_colour: bpy.props.FloatVectorProperty( \
          description="Blend to this colour near the 0 coordinate on UP axis"\
    )
    shore_colour: bpy.props.FloatVectorProperty( \