mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-26 18:22:33 +08:00
fix handheld lights
This commit is contained in:
@ -366,7 +366,7 @@ void main() {
|
|||||||
// if(HELD_ITEM_BRIGHTNESS > 0.0) torchlightmap = max(torchlightmap, HELD_ITEM_BRIGHTNESS * clamp( pow(max(1.0-length(worldpos-playerCamPos)/HANDHELD_LIGHT_RANGE,0.0),1.5),0.0,1.0));
|
// if(HELD_ITEM_BRIGHTNESS > 0.0) torchlightmap = max(torchlightmap, HELD_ITEM_BRIGHTNESS * clamp( pow(max(1.0-length(worldpos-playerCamPos)/HANDHELD_LIGHT_RANGE,0.0),1.5),0.0,1.0));
|
||||||
if(HELD_ITEM_BRIGHTNESS > 0.0){
|
if(HELD_ITEM_BRIGHTNESS > 0.0){
|
||||||
|
|
||||||
float pointLight = 1-clamp(1.0-length(worldpos-playerCamPos)/HANDHELD_LIGHT_RANGE,-0.999,1.0);
|
float pointLight = clamp(1.0-(length(worldpos-playerCamPos)-1)/HANDHELD_LIGHT_RANGE,0.0,1.0);
|
||||||
|
|
||||||
torchlightmap = mix(torchlightmap, HELD_ITEM_BRIGHTNESS, pointLight);
|
torchlightmap = mix(torchlightmap, HELD_ITEM_BRIGHTNESS, pointLight);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user