[GL renderer] Fix up float * vec4 mul

This commit is contained in:
wheremyfoodat 2023-06-29 21:37:31 +03:00
parent 3603ee1e13
commit 84fd0affa8
2 changed files with 7 additions and 7 deletions

View file

@ -65,8 +65,8 @@ class ShaderEmitter : public Xbyak::CodeGenerator {
// Result is returned in the zero flag. If the comparison is true then zero == 0, else zero == 1 (Opposite of checkCmpRegister)
void checkBoolUniform(const PICAShader& shader, u32 instruction);
// Emit a call to a C++ function
void callCppFunc(void* function) { Helpers::panic("[ShaderJIT] Unimplemented: Add support for calling C++ functions in JITted code"); }
// Prints a log. This is not meant to be used outside of debugging so it is very slow with our internal ABI.
void printLog(void* ptr);
// Instruction recompilation functions
void recADD(const PICAShader& shader, u32 instruction);

View file

@ -32,11 +32,11 @@ const char* vertexShader = R"(
vec4 abgr8888ToVec4(uint abgr) {
const float scale = 1.0 / 255.0;
return vec4(
scale * float(abgr & 0xffu),
scale * float((abgr >> 8) & 0xffu),
scale * float((abgr >> 16) & 0xffu),
scale * float(abgr >> 24)
return scale * vec4(
float(abgr & 0xffu),
float((abgr >> 8) & 0xffu),
float((abgr >> 16) & 0xffu),
float(abgr >> 24)
);
}