Editing Multimedia Formats and Tools

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 360: Line 360:
**https://games.slashdot.org/story/04/07/30/1837253/sony-endorsing-open-graphics-format-for-ps3
**https://games.slashdot.org/story/04/07/30/1837253/sony-endorsing-open-graphics-format-for-ps3


==FPO and VPO==
==FPO==
*FPO ('''F'''ragment '''P'''rogram '''O'''bjects)
*VPO ('''V'''ertex '''P'''rogram '''O'''bjects)
*Used inside:
**[[Qt Resource Container (QRC)|QRC containers]]
**[[PS2 Emulation|ps2_netemu.self]]


This files are [https://en.wikipedia.org/wiki/Cg_(programming_language) Cg shaders] created by the Cg compiler ('''sce-cgc.exe'''), and are compatible with the Cg disassembler ('''sce-cgcdisasm.exe''') from [[SCEI PS3 SDK]]
==VPO==
 
See: [http://games.soc.napier.ac.uk/resources/ps3/ps3_tutorial_004.pdf Introduction to GCM and PS3 graphics] (pages 4 and 5), and [https://arxiv.org/ftp/cs/papers/0302/0302013.pdf Cg in Two Pages]
 
*The compiler acepts 2 arguments:
**'''-p''': For the PS3 RSX is needed to use the profiles: '''sce_fp_rsx''' (to compile a fragment shader and create a FPO file), or '''sce_vp_rsx''' (to compile a vertex shader and create a VPO file)
**'''-o''': the output filename
 
{{keyboard|content=<syntaxhighlight lang="bash">C:\usr\local\cell\host-win32\Cg\bin\sce-cgc.exe -p sce_fp_rsx -o OUTPUT.FPO input_fshader.cg</syntaxhighlight>}}
{{Boxcode|title=input_fshader.cg|float=left|width=auto|code=<syntaxhighlight lang="c">
void main
(
float4 color_in : COLOR,
out float4 color_out : COLOR
)
{
color_out = color_in;
}
</syntaxhighlight>}}
 
{{keyboard|content=<syntaxhighlight lang="bash">C:\usr\local\cell\host-win32\Cg\bin\sce-cgc.exe -p sce_vp_rsx -o OUTPUT.VPO input_vshader.cg</syntaxhighlight>}}
{{Boxcode|title=input_vshader.cg|float=left|width=auto|code=<syntaxhighlight lang="c">
void main
(
float4 position : POSITION,
float4 color : COLOR,
 
uniform float4x4 modelViewProj,
 
out float4 oPosition : POSITION,
out float4 oColor : COLOR
)
{
oPosition = position;
oColor = color;
}
</syntaxhighlight>}}
{{clear}}
 
*Notes/speculation
**The PS3 RSX Cg profiles ('''sce_fp_rsx''' & '''sce_vp_rsx''') probably are custom, but based in the [https://developer.nvidia.com/cg-profiles standard profiles]
**[http://www.psx-place.com/threads/my-vertex-shader-document.20794/ Open Source code related with PS3 Cg shaders]


==MNU==
==MNU==
Please note that all contributions to PS3 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS3 Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)