Skip to content

Commit 49cf4dd

Browse files
committed
Cleanup around Outlet Env.
Dust direction and some plant haze settings
1 parent 828a57c commit 49cf4dd

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

docs/js/pxlNavLoader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const pxlAssetRoot = "./js/pxlAssets";
3030
const showOnboarding = true;
3131

3232
// Current possible rooms - "OutletEnvironment", "VoidEnvironment"
33-
const bootRoomList = ["OutletEnvironment", "VoidEnvironment"];
33+
const bootRoomList = ["OutletEnvironment"];//, "VoidEnvironment"];
3434
const startingRoom = bootRoomList[0];
3535

3636
// -- -- --
-5.38 KB
Binary file not shown.
-90.7 KB
Binary file not shown.

docs/js/pxlRooms/OutletEnvironment/OutletEnvironment.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ buildDust(){
8080
let particleOpacity = .6; // Overall Opacity
8181
let opacityRolloff = 1.9; // Distance-opacity falloff multiplier
8282

83-
let windDirection = new Vector3( -0.9, 0.25, -7 ); // Constant direction flow
83+
let windDirection = new Vector3( 8.218, 0.406, -7.812 ); // Constant direction flow
8484
let wanderInfluence = 0.80; // How much the particle sways
8585
let wanderFrequency = 2.30; // How frequent the sway happens
8686

@@ -216,15 +216,13 @@ buildDust(){
216216
{
217217
'diffuse' : { type:'t', value: null },
218218
'alphaMap' : { type:'t', value: null },
219-
/*'normalMap' : { type:'t', value: null },*/
220219
'noiseTexture' : { type:'t', value: null },
221220
'fogColor' : { type: "c", value: this.fogColor }
222221
}]
223222
)
224223
grassCardsAUniforms.noiseTexture.value = this.pxlUtils.loadTexture( this.assetPath+"Noise_UniformWebbing.jpg" );
225224
grassCardsAUniforms.diffuse.value = this.pxlUtils.loadTexture( this.assetPath+"grassCardsA_diffuse.jpg" );
226225
grassCardsAUniforms.alphaMap.value = this.pxlUtils.loadTexture( this.assetPath+"grassCardsA_alpha.jpg" );
227-
//grassCardsAUniforms.normalMap.value = this.pxlUtils.loadTexture( this.assetPath+"grassCardsA_normal.jpg" );
228226

229227
let grassCardsMat=this.pxlFile.pxlShaderBuilder( grassCardsAUniforms, instPlantsVert(), instPlantsFrag( true, true ) );
230228
grassCardsMat.side = DoubleSide;
@@ -416,7 +414,7 @@ buildDust(){
416414
//
417415
// -- -- --
418416

419-
let fieldFbxLoader = this.pxlFile.loadRoomFBX( this ) ;//, null, null, true );
417+
let fieldFbxLoader = this.pxlFile.loadRoomFBX( this );//, null, null, true );
420418

421419
// -- -- -- -- -- -- -- -- -- -- -- -- -- //
422420

docs/js/pxlRooms/OutletEnvironment/Shaders/instPlants.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,14 @@ export function instPlantsFrag( buildAlpha=false, addShimmer=false ){
135135
const float DepthScalar = .0001;
136136
const float ScreenWarpColorFix = 3.521;
137137
const float ShadowTighten = 2.94;
138+
const float FogDepthMult = 0.05;
138139
`;
139140
if( addShimmer ){
140141
ret+=`
141142
// Shimmer Settings --
142143
// Mid-to-long distance ambient movement in grass + foliage
143-
const float ShimmerInf = 1.0;
144-
const float ShimmerBrightness = .74;
144+
const float ShimmerInf = 0.40;
145+
const float ShimmerBrightness = .4;
145146
const float ShimmerStartMul = 42.0;
146147
const float ShimmerStartRolloff = 1.30;
147148
const float ShimmerEndMult = 4.5;
@@ -244,7 +245,7 @@ export function instPlantsFrag( buildAlpha=false, addShimmer=false ){
244245
float gInf = min( 1.0, max( 0.0, 1.0-depth * ShimmerEndMult ) * ShimmerEndRolloff );
245246
float shimmerInf = ( 1.0 - min(1.0, max( 0.0, 1.0-depth * ShimmerStartMul * ShimmerBrightness ) * ShimmerStartRolloff )) * gInf;
246247
247-
float timer = time.x*1.85 + .02*(vCd.y) + vPos.z*.001*vCd.y*vCd.z;
248+
float timer = time.x*(1.85+vCd.x*1.1) + .2*(vCd.y) + vPos.z*.01*vCd.y*vCd.z;
248249
249250
float vertlightInf = (sin(vCd.x+timer*(1.0+vCd.y*.001))*.4*ShimmerInf+(1.00-ShimmerInf*.2)) * min( 1.0, vCd.x*ShadowTighten );
250251
vertlightInf = min(1.0, (ShimmerInf) - (1.0-vertlightInf) );
@@ -332,9 +333,15 @@ export function instPlantsFrag( buildAlpha=false, addShimmer=false ){
332333
Cd.rgb = Cd.rgb * (vCd.z*.25*(1.0-gCd)-depth*.1+.45) * (vCd.x*depthFade + 1.0-gCd*depthFade);
333334
`;
334335
}
336+
if( addShimmer ){
337+
ret+=`
338+
Cd.rgb = mix( Cd.rgb, vec3( gCd*3.4 ), depth );
339+
`;
340+
}
335341
ret+=`
336342
337-
float fogMix = clamp( depth * (depth*4.501+1.5) - lightMag*(1.0-depth*1.), 0.0, 1.0 ) ;
343+
344+
float fogMix = clamp( depth * (depth*4.501+1.5) - lightMag*(1.0-depth * FogDepthMult), 0.0, 1.0 ) ;
338345
339346
vec3 toFogColor = fogColor * (gCd*.4 + .7 + gInf*.3);
340347
Cd.rgb= mix( Cd.rgb, toFogColor, fogMix );

0 commit comments

Comments
 (0)