Homepage › Forums › RetroPie Project › Everything else related to the RetroPie Project › Convert CG Shader to GLSL ?
Tagged: shader cg glsl
- This topic has 5 replies, 3 voices, and was last updated 10 years, 2 months ago by vitiman.
-
AuthorPosts
-
09/24/2014 at 21:53 #78062odissineParticipant
Hello all,
I want to convert some of my .cg shader i’ve in RetroArch on my PC (big conifguration) to .glsl shader version to use it on my RetroPie version.Every forum, website talk about cg2glsl.py tools … but I don’t know how to use it ^^
I’ve got Mac, PC and Raspberry but I don’t know how to use it on any device :(Someone could help me ? Or give a link to download . glsl shader for Gameboy like dmg-shader-2x to simulate gameboy screen ^^
Thanks for you help.
09/25/2014 at 14:54 #79280odissineParticipantI saw in differents site it’s possible to run .cg/cgp shaders.
So I tried to modify retroarch.cfg file like this :
# Path to shader. Shader can be either Cg, CGP or GLSL, GLSLP. video_shader = "/opt/retropie/emulators/RetroArch/shader/.{cg,cgp,glsl,glslp}" #Other shaders can still be loaded later in runtime video_shader_enable = true #Defines a directory where shaders (Cg, CGP, GLSL) are kept for easy access. video_shader_dir = "/opt/retropie/emulators/RetroArch/shader/"
And for gb core (GameBoy), I wanted to try using this one
video_shader = "/opt/retropie/emulators/RetroArch/shader/handheld/dmg-shader/dmg-shader-2x.cgp" video_shader_enable = true
But emulationstation says it didn’t works …
Could anywone help me in order to use this shader. I want to use the gameboy shader the one who is exactly the same as the real gameboy color ;)Thanks for your help
09/25/2014 at 20:19 #79662gizmo98ParticipantIt is necessary to convert cg shaders to glsl shaders. To do this you need the nvidia cg toolkit. The toolkit is only available for x86 platforms. So you need a ubuntu live cd and a PC to convert a shader.
If everything is installed download and run cg2glsl.py:
https://github.com/libretro/RetroArch/blob/master/tools/cg2glsl.py09/25/2014 at 21:09 #79737odissineParticipantHowahou … SO I’ve to install Ubuntu on a USB for using in live on a PC. And with Ubuntu I could launch directly the .py file ?
I’ll try this WE :) THanks for your help09/27/2014 at 19:38 #81317gizmo98ParticipantTry
./cg2glsl.py *shader file*
. cg2glsl.py must be executable.09/30/2014 at 21:41 #81404vitimanParticipantHi there!
I’m trying to convert this shader too using the conversion script from RetroArch Library But I receive this error when loading the gameboy emulator.
RetroArch: [libretro INFO] :: [Gambatte]: Got internal game name: RetroArch [ERROR] :: Failed to link program #0. RetroArch [ERROR] :: Failed to create GL program #0. RetroArch [ERROR] :: [GL]: Failed to init shader, falling back to stock. RetroArch [WARN] :: [GL]: Stock GLSL shaders will be used.
I’ve converted 2x and 4x, put in the same shader directory as the rest, copying the resources and shader-Xx (the .glsp has the relative paths). Set the permissions 0755 like the others.
Nothing relevant in my gb config:
video_smooth = false video_shader = "/opt/retropie/emulators/RetroArch/shader/dmg-shader-4x.glslp" video_shader_enable = true
I forgot something, any clues? Is it about the emulation config? It cannot be loading this shader on rpi compilation?
P.S: I’ve attached the dmg-shader with the results and the python script.
Thanks a lot! And keep up the good work!
-
AuthorPosts
- The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.