mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-28 16:06:17 +00:00
partial maintain state
This commit is contained in:
4 files changed
+18
-18
No files matched your search
@@ -24,7 +24,6 @@ object MaterialRenderHelper {
|
||||
|
||||
def start(pos: Vector3, pass: Int, uvt: UVTransformation) = {
|
||||
this.pass = pass
|
||||
// TODO: update to use a thread local copy
|
||||
builder = CCRenderState.instance().pipeline.builder()
|
||||
builder.add(pos.translation()).add(uvt)
|
||||
this
|
||||
@@ -86,9 +85,10 @@ class BlockMicroMaterial(val block: Block, val meta: Int = 0)
|
||||
if (pass == -1)
|
||||
block.getBlockColor << 8 | 0xff
|
||||
else {
|
||||
val pos = CCRenderState.instance().lightMatrix.pos
|
||||
val state = CCRenderState.instance
|
||||
val pos = state.lightMatrix.pos
|
||||
block.colorMultiplier(
|
||||
CCRenderState.instance().lightMatrix.access,
|
||||
state.lightMatrix.access,
|
||||
pos.x,
|
||||
pos.y,
|
||||
pos.z
|
||||
|
||||
Reference in new issue
Block a user