[orx-shader-phrases] mat2 is valid GLSL but was missing (#271)
This commit is contained in:
@@ -61,7 +61,7 @@ object ShaderPhraseRegistry {
|
||||
*/
|
||||
fun getGLSLFunctionName(glsl: String): String {
|
||||
val functionRex =
|
||||
Regex("""\s*(float|int|[bi]?vec[234]|mat[34])\s+(\w+)\s*\(.*\).*""")
|
||||
Regex("""\s*(float|int|[bi]?vec[234]|mat[234])\s+(\w+)\s*\(.*\).*""")
|
||||
val defs = glsl.split("\n").filter {
|
||||
functionRex.matches(it)
|
||||
}.take(1).mapNotNull {
|
||||
|
||||
@@ -17,6 +17,7 @@ object TestFunctionNameRx : Spek({
|
||||
"vec4 ggg() {" to "ggg",
|
||||
"vec3 hhh() {" to "hhh",
|
||||
"vec2 iii() {" to "iii",
|
||||
"mat2 ii2() {" to "ii2",
|
||||
"mat3 jjj() {" to "jjj",
|
||||
"mat4 kkk() {" to "kkk",
|
||||
"float lll() {" to "lll",
|
||||
|
||||
Reference in New Issue
Block a user