mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-14 07:36:06 +09:00
blockprop opacity to be actually cached
This commit is contained in:
@@ -111,7 +111,7 @@ object BlockCodex {
|
|||||||
prop.shadeColG = floatVal(record, "shdg") / LightmapRenderer.MUL_FLOAT
|
prop.shadeColG = floatVal(record, "shdg") / LightmapRenderer.MUL_FLOAT
|
||||||
prop.shadeColB = floatVal(record, "shdb") / LightmapRenderer.MUL_FLOAT
|
prop.shadeColB = floatVal(record, "shdb") / LightmapRenderer.MUL_FLOAT
|
||||||
prop.shadeColA = floatVal(record, "shduv") / LightmapRenderer.MUL_FLOAT
|
prop.shadeColA = floatVal(record, "shduv") / LightmapRenderer.MUL_FLOAT
|
||||||
prop.shadeColor = Color(prop.shadeColR, prop.shadeColG, prop.shadeColB, prop.shadeColA)
|
prop.opacity = Color(prop.shadeColR, prop.shadeColG, prop.shadeColB, prop.shadeColA)
|
||||||
|
|
||||||
prop.strength = intVal(record, "str")
|
prop.strength = intVal(record, "str")
|
||||||
prop.density = intVal(record, "dsty")
|
prop.density = intVal(record, "dsty")
|
||||||
|
|||||||
@@ -16,13 +16,8 @@ class BlockProp {
|
|||||||
var shadeColG = 0f
|
var shadeColG = 0f
|
||||||
var shadeColB = 0f
|
var shadeColB = 0f
|
||||||
var shadeColA = 0f
|
var shadeColA = 0f
|
||||||
lateinit var shadeColor: Color
|
|
||||||
|
|
||||||
/**
|
lateinit var opacity: Color
|
||||||
* @param opacity Raw RGB value, without alpha
|
|
||||||
*/
|
|
||||||
inline val opacity: Color
|
|
||||||
get() = Color(shadeColR, shadeColG, shadeColB, shadeColA)
|
|
||||||
|
|
||||||
var strength: Int = 0
|
var strength: Int = 0
|
||||||
var density: Int = 0
|
var density: Int = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user