mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-25 06:26:56 +01:00
You merely adopted it
- Default light to 0 in DefaultVertexList - Take the max of mesh and instance light in the instance shader
This commit is contained in:
parent
9e60045d43
commit
e1ddd7c2fc
4 changed files with 4 additions and 5 deletions
|
@ -1,7 +1,6 @@
|
|||
package dev.engine_room.flywheel.lib.vertex;
|
||||
|
||||
import dev.engine_room.flywheel.api.vertex.MutableVertexList;
|
||||
import net.minecraft.client.renderer.LightTexture;
|
||||
import net.minecraft.client.renderer.texture.OverlayTexture;
|
||||
|
||||
public interface DefaultVertexList extends MutableVertexList {
|
||||
|
@ -57,7 +56,7 @@ public interface DefaultVertexList extends MutableVertexList {
|
|||
|
||||
@Override
|
||||
default int light(int index) {
|
||||
return LightTexture.FULL_BRIGHT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -6,5 +6,5 @@ void flw_instanceVertex(in FlwInstance i) {
|
|||
flw_vertexColor *= i.color;
|
||||
flw_vertexOverlay = i.overlay;
|
||||
// Some drivers have a bug where uint over float division is invalid, so use an explicit cast.
|
||||
flw_vertexLight = vec2(i.light) / 256.0;
|
||||
flw_vertexLight = max(vec2(i.light) / 256.0, flw_vertexLight);
|
||||
}
|
||||
|
|
|
@ -4,5 +4,5 @@ void flw_instanceVertex(in FlwInstance i) {
|
|||
flw_vertexColor *= i.color;
|
||||
flw_vertexOverlay = i.overlay;
|
||||
// Some drivers have a bug where uint over float division is invalid, so use an explicit cast.
|
||||
flw_vertexLight = vec2(i.light) / 256.0;
|
||||
flw_vertexLight = max(vec2(i.light) / 256.0, flw_vertexLight);
|
||||
}
|
||||
|
|
|
@ -4,5 +4,5 @@ void flw_instanceVertex(in FlwInstance i) {
|
|||
flw_vertexColor *= i.color;
|
||||
flw_vertexOverlay = i.overlay;
|
||||
// Some drivers have a bug where uint over float division is invalid, so use an explicit cast.
|
||||
flw_vertexLight = vec2(i.light) / 256.0;
|
||||
flw_vertexLight = max(vec2(i.light) / 256.0, flw_vertexLight);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue