libretro / common-shaders

Collection of commonly used Cg shaders. These shaders are usable by either HLSL and/or Cg runtime compilers. The cg2glsl script will translate most of these into GLSL shaders.
http://www.libretro.com
1.05k stars 250 forks source link

Typo fixes to .cgp files #161

Closed Dwedit closed 3 years ago

Dwedit commented 3 years ago

Fix some typos in the .cgp files. Typos include:

hizzlekizzle commented 3 years ago

Thankfully, it looks like all of the malformed 'scale' lines are not strictly necessary anyway, as they're all being implicitly set to 1.0 anyway. I think @hyperspacemadness recently made it so you don't need to declare the variables before assigning a value in the presets, but it's a good idea to add those in anyway.

Does feedback motionblur even work in Cg? I didn't think the feedback functionality was even implemented. We might be better off just removing it altogether (I probably copied it in a long time ago, either mistakenly as part of a bulk reconciliation with the slang repo, or intentionally thinking feedback would get backported to Cg at some point)

Dwedit commented 3 years ago

There's also a few that specify parameters for more passes than the number of passes defined. anti-aliasing\aa-shader-4.o-level2.cgp cgp\tvout\tvout-jinc-sharpen.cgp handheld\shaders\lcd-shader\backup\lcd-shader.cgp handheld\shaders\lcd-shader\backup-2\lcd-shader.cgp Example: aa-shader-4.o-level2.cgp says there are only two shaders, but specifies options for the third shader (2).

inactive123 commented 3 years ago

Hi @Dwedit,

thanks for these contributions. Does this make the shaders work as both Cg and HLSL9 code?

Dwedit commented 3 years ago

This is just a few typo fixes. It isn't the big change that makes them compatible with HLSL.

Since I have my own parser for CGP files, I scanned all of them for parse errors, and that's what I found.

inactive123 commented 3 years ago

Alright, well. @hizzlekizzle you think this is OK to merge as-is? What about some of these suggestions regarding these other shaders? Can we go in and clean that up?

hizzlekizzle commented 3 years ago

Sure, these are all good changes.