mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 22:19:02 +00:00
Implement fs::get_cache_dir
Win32: equal to config dir for now Linux: respect XDG_CACHE_HOME if specified OSX: possibly incomplete
This commit is contained in:
parent
20efed66e9
commit
bd9131ae1c
15 changed files with 69 additions and 28 deletions
|
|
@ -299,11 +299,11 @@ void GLVertexDecompilerThread::insertMainEnd(std::stringstream & OS)
|
|||
//RSX matrices passed already map to the [0, 1] range but mapping to classic OGL requires that we undo this step
|
||||
//This can be made unnecessary using the call glClipControl(GL_LOWER_LEFT, GL_ZERO_TO_ONE).
|
||||
//However, ClipControl only made it to opengl core in ver 4.5 though, so this is a workaround.
|
||||
|
||||
|
||||
//NOTE: It is completely valid for games to use very large w values, causing the post-multiplied z to be in the hundreds
|
||||
//It is therefore critical that this step is done post-transform and the result re-scaled by w
|
||||
//SEE Naruto: UNS
|
||||
|
||||
|
||||
//NOTE: On GPUs, poor fp32 precision means dividing z by w, then multiplying by w again gives slightly incorrect results
|
||||
//This equation is simplified algebraically to an addition and subreaction which gives more accurate results (Fixes flickering skybox in Dark Souls 2)
|
||||
//OS << " float ndc_z = gl_Position.z / gl_Position.w;\n";
|
||||
|
|
@ -345,7 +345,7 @@ void GLVertexProgram::Compile()
|
|||
const char* str = shader.c_str();
|
||||
const int strlen = ::narrow<int>(shader.length());
|
||||
|
||||
fs::file(fs::get_config_dir() + "shaderlog/VertexProgram" + std::to_string(id) + ".glsl", fs::rewrite).write(str);
|
||||
fs::file(fs::get_cache_dir() + "shaderlog/VertexProgram" + std::to_string(id) + ".glsl", fs::rewrite).write(str);
|
||||
|
||||
glShaderSource(id, 1, &str, &strlen);
|
||||
glCompileShader(id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue