mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-22 08:42:50 +08:00
Add shader-side handheld lights
This commit is contained in:
@ -46,6 +46,9 @@ attribute vec4 mc_Entity;
|
||||
uniform int blockEntityId;
|
||||
uniform int entityId;
|
||||
|
||||
uniform int heldItemId;
|
||||
uniform int heldItemId2;
|
||||
flat varying float HELD_ITEM_BRIGHTNESS;
|
||||
|
||||
flat varying float blockID;
|
||||
flat varying int LIGHTNING;
|
||||
@ -185,11 +188,13 @@ void main() {
|
||||
vtexcoord.xy = sign(texcoordminusmid)*0.5+0.5;
|
||||
#endif
|
||||
|
||||
vec2 lmcoord = gl_MultiTexCoord1.xy / 255.0; // is this even correct? lol
|
||||
vec2 lmcoord = gl_MultiTexCoord1.xy / 255.0; // is this even correct? lol'
|
||||
lmtexcoord.zw = lmcoord;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef MC_NORMAL_MAP
|
||||
tangent = vec4(normalize(gl_NormalMatrix *at_tangent.rgb),at_tangent.w);
|
||||
#endif
|
||||
@ -216,7 +221,7 @@ void main() {
|
||||
EMISSIVE = 0.0;
|
||||
|
||||
// normal block lightsources
|
||||
if(mc_Entity.x == 10005) EMISSIVE = 0.5;
|
||||
if(mc_Entity.x == 10005) EMISSIVE = 0.3;
|
||||
|
||||
// special cases light lightning and beacon beams...
|
||||
#ifdef ENTITIES
|
||||
@ -226,6 +231,14 @@ void main() {
|
||||
/////// ----- SSS STUFF ----- ///////
|
||||
SSSAMOUNT = 0.0;
|
||||
|
||||
|
||||
HELD_ITEM_BRIGHTNESS = 0.0;
|
||||
|
||||
#ifdef Hand_Held_lights
|
||||
if(heldItemId == 100 || heldItemId2 == 100) HELD_ITEM_BRIGHTNESS = 1.0;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef WORLD
|
||||
|
||||
/////// ----- SSS ON BLOCKS ----- ///////
|
||||
|
Reference in New Issue
Block a user