Custom PPSSPP shaders
|
06-30-2014, 08:10 PM
Post: #147
|
|||
|
|||
RE: Custom PPSSPP shaders
[quote='LunaMoo' pid='86966' dateline='1403570875']
@bdszoke why don't you experiment? Just open ppsspp in a window, open shader in notepad or any editor you're using to edit it, and after you make your change and save it, it's enough to resize the window, switch to fullscreen/back or change anything else that works to refresh the shader instantly.:] If you have problem understanding some function like clamp or dot you could just check directly @...... everything else is just a math. Thanks for the reference link, that is quite helpful. But my issue, which I haven't been able to figure out despite a full week of experimentation and googling since then is how to merge those two functions in the shader. At this point I have two functions, but it only seems to be doing the first. In this case what I have currently is float distance = dot(v_texcoord0 - 0.5, v_texcoord0 - 0.5); distance = clamp(distance - 0.7, 0.0, 1.0); float vignette = 1.0 + 0.7 * (distance * 3.0) + (dot(v_texcoord0 - 0.5, v_texcoord0 - 0.5) * 4.0); where I am trying to modify both the brightness and location of the float vignette. So I have float vignette = 1.0 + 0.4 * (dot(v_texcoord0 - 0.5, v_texcoord0 - 0.5) * 2.0); which in the original one, controls the brightness and float distance = dot(v_texcoord0 - 0.5, v_texcoord0 - 0.5); distance = clamp(distance - 0.7, 0.0, 1.0); float vignette = 1.0 + 0.7 * (distance * 3.0); which controls the location and starting point of the vignette. Either one by itself works, it's just my attempts to do both that doesn't. I know this might seem like a stupid question to ask, but keep in mind that my background is in History and Art, and not coding. I've never done any sort of coding in my life. Of course, that's why I want to learn now |
|||
« Next Oldest | Next Newest »
|