Skip to content

Commit f597e04

Browse files
committed
Campfire Wisps and RabbitDruid shader tweaks
1 parent dedac49 commit f597e04

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

docs/js/pxlNav.esm.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/js/pxlRooms/CampfireEnvironment/CampfireEnvironment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ export class CampfireEnvironment extends RoomEnvironment{
225225

226226
buildEmberWisps( particleSourcePos ){
227227

228-
let systemName = "emberWisps";
228+
let systemName = "campfireEmberWisps";
229229
let eWisps = new EmberWisps( this, systemName );
230230
this.particleList[systemName] = eWisps;
231231
//

docs/js/pxlRooms/CampfireEnvironment/Shaders/RabbitDruid_campfire.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,18 +136,16 @@ export function rabbitDruidFrag(){
136136
vec4 nCd=texture2D(noiseTexture,animUv);
137137
138138
// -- -- -- //
139-
140-
float lightContrib = 1.0-clamp( dot( vN, normalize( vPos ))*1.5, 0.0, 1.0 );
139+
vec3 reflectNorm = reflect( normalize(vPos), vN );
140+
float lightContrib = 1.0-clamp( dot( reflectNorm, vTan)*.5, 0.0, 1.0 );
141141
float lMag = 0.0;
142142
143143
vec3 lights = vec3(0.0, 0.0, 0.0);
144144
int x=0;
145145
#if NUM_POINT_LIGHTS > 0
146146
for( x=0; x < NUM_POINT_LIGHTS; ++x ) {
147147
vec3 lightVector = normalize( pointLights[x].position - vPos) + vec3( -0.50, .10, -0.50 ) ;
148-
//vec3 refTan = vec3( (dot( normalize(lightVector)- nCd.xyz, vN )*.5+.5) * (dot(normalize(pointLights[x].position), vN)*.5+.5) );
149148
vec3 refTan = reflect( normalize(lightVector) - nCd.xyz*.3, vTan );
150-
//refTan = normalize( refTan + vec3(-.10, -max(nCd.x,nCd.y)*.3 , -.10) );
151149
152150
vec3 lightInf= clamp( (dot(refTan, vN )+.15)*(1.65+areCd.g*.7)+.5, 0.0, 1.0) * pointLights[x].color;
153151
lights += lightInf * lightContrib;

0 commit comments

Comments
 (0)