ну и этот мусор

This commit is contained in:
DBotThePony 2023-02-21 07:44:48 +07:00
parent b40f3e8dca
commit 9d41380c16
Signed by: DBot
GPG Key ID: DCC23B5715498507
3 changed files with 12 additions and 20 deletions

View File

@ -1,4 +0,0 @@
package ru.dbotthepony.kstarbound.client.gl.shader
import ru.dbotthepony.kstarbound.client.gl.GLStateTracker
import ru.dbotthepony.kvector.vector.Color

View File

@ -1,4 +0,0 @@
package ru.dbotthepony.kstarbound.client.gl.shader
import ru.dbotthepony.kstarbound.client.gl.GLStateTracker
import ru.dbotthepony.kvector.matrix.nfloat.Matrix4f

View File

@ -11,6 +11,18 @@ import ru.dbotthepony.kstarbound.client.render.GPULightRenderer
import ru.dbotthepony.kvector.matrix.nfloat.Matrix4f import ru.dbotthepony.kvector.matrix.nfloat.Matrix4f
import ru.dbotthepony.kvector.vector.Color import ru.dbotthepony.kvector.vector.Color
private fun GLStateTracker.shaders(name: String): List<GLStateTracker.Shader> {
return listOf(internalVertex("shaders/$name.vsh"), internalFragment("shaders/$name.fsh"))
}
private fun GLStateTracker.gshaders(name: String): List<GLStateTracker.Shader> {
return listOf(
internalVertex(name),
internalFragment(name),
internalGeometry(name)
)
}
open class GLTransformableProgram(state: GLStateTracker, shaders: Iterable<GLStateTracker.Shader>) : GLShaderProgram(state, shaders) { open class GLTransformableProgram(state: GLStateTracker, shaders: Iterable<GLStateTracker.Shader>) : GLShaderProgram(state, shaders) {
val transform = F4x4Uniform("_transform") val transform = F4x4Uniform("_transform")
@ -27,18 +39,6 @@ open class GLTransformableColorableProgram(state: GLStateTracker, shaders: Itera
} }
} }
private fun GLStateTracker.shaders(name: String): List<GLStateTracker.Shader> {
return listOf(internalVertex("shaders/$name.vsh"), internalFragment("shaders/$name.fsh"))
}
private fun GLStateTracker.gshaders(name: String): List<GLStateTracker.Shader> {
return listOf(
internalVertex(name),
internalFragment(name),
internalGeometry(name)
)
}
class GLLiquidProgram(state: GLStateTracker) : GLShaderProgram(state, state.shaders("liquid")) { class GLLiquidProgram(state: GLStateTracker) : GLShaderProgram(state, state.shaders("liquid")) {
val baselineColor = F4Uniform("baselineColor") val baselineColor = F4Uniform("baselineColor")
val transform = F4x4Uniform("transform") val transform = F4x4Uniform("transform")