Difference between revisions of "Oblivion Shader Editor"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Raziel23x
m (added the creator of the program for who to give credit to for creating this tool)
imported>Saebel
 
(19 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Unfinished}}{{Update}}
{{Unfinished}}


== Oblivion Shader Editor ==
== Oblivion Shader Editor ==
By Timeslip
By [[User:Timeslip|Timeslip]]


=== Description ===
=== Description ===
This (Sdp) is used to edit and compile the shader packages found in the shader folder inside the data folder in your TESIV: Oblivion.
This (sdp) is used to edit and compile the shader packages found in the shader folder inside the data folder in your TESIV: Oblivion.


=== Download ===
=== Download ===
;Version 0.3
[timeslip.users.sourceforge.net/, Timeslip's utilities]
[http://timeslip.chorrol.com/current/ShaderEdit.7z Oblivion Shader Editor]
 
;Version 0.3
Warning! This utility might damage your shaders!
[http://timeslip.chorrol.com/current/ShaderEditSource.7z Source Code]
Details: Oblivion shaders always contain CTAB (Constant TABles) which are used by the engine. If you disassemble and re-assemble the shader's code then resulting shader differs from the original. As a result some variables might be unbound resulting in ex. missing water animation or other similar problems.


== Misc Shader Tools ==
== Misc Shader Tools ==
=== Microsoft ===


[http://msdn.microsoft.com/coding4fun/gamedevelopment/rocketcmd/default.aspx Microsoft Game-writing tutorial] - The german version is much better, with video tutorials and lots of shader coverage and a real worthy introduction to Agile development ([http://www.microsoft.com/germany/msdn/coding4fun/gamedev/tutorial/profitutorials.mspx De]).
[http://msdn.microsoft.com/coding4fun/gamedevelopment/rocketcmd/default.aspx Microsoft Game-writing tutorial] - The german version is much better, with video tutorials and lots of shader coverage and a real worthy introduction to Agile development ([http://www.microsoft.com/germany/msdn/coding4fun/gamedev/tutorial/profitutorials.mspx De]).
Line 23: Line 26:
[http://msdn.microsoft.com/vstudio/express/visualc/ Visual C++ Express Edition] - The must-have IDE for free Windows programming.
[http://msdn.microsoft.com/vstudio/express/visualc/ Visual C++ Express Edition] - The must-have IDE for free Windows programming.


[http://developer.nvidia.com/page/tools.html NVidia 3D Tools] - Home of NVidia' vast archive of game development tools.


[http://developer.nvidia.com/object/fx_composer_home.html NVidia FX Composer] - Shader development IDE for the HLSL, with preview and lots of useful tools.
=== NVIDIA ===


[http://developer.nvidia.com/object/sdk_home.html NVidia SDK] - Huge collection of examples, also shaders.
[http://developer.nvidia.com/page/tools.html NVIDIA 3D Tools] - Home of NVIDIA's vast archive of game development tools.
 
[http://developer.nvidia.com/object/fx_composer_home.html NVIDIA FX Composer] - Shader development IDE for the HLSL, with preview and lots of useful tools.
 
[http://developer.nvidia.com/object/sdk_home.html NVIDIA SDK] - Huge collection of examples, also shaders.
 
=== ATI ===


[http://www.ati.com/developer/rendermonkey/index.html Ati's RenderMonkey] - Ati's version of a shader development IDE.
[http://www.ati.com/developer/rendermonkey/index.html Ati's RenderMonkey] - Ati's version of a shader development IDE.
== Tutorials ==
[http://www.coniserver.net/wiki/index.php/Simple_HLSL_Shader_Tutorial Simple HLSL Shader Tutorial] Gamestudio Wiki!
[http://www.dragonforgetechnology.com/Projects/Articles/ShaderArticle.html HLSL Shader Tutorial] By Donald Beals
[http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/directx9_c_Dec_2005/HLSL_Shaders.asp HLSL Shaders] Microsoft
[http://msdn2.microsoft.com/en-gb/library/bb219841.aspx Pixel Shaders] MSDN
[http://mgeshaderlibrary.wikispaces.com/Tutorials MSL Tutorials] MGE Shader Library
== Examples ==
=== Night-Eye ===
Editing the Night-Eye Shader
==== Original Shader ====
ps_1_3
def c0, 1, 0, 0, -1
def c2, 1, 1, 1, 0.5
def c3, 0.209999993, 0.5, 0.779999971, 0
def c4, 0, 0, 0, 1
tex t0
dp3 r1, c0, c1
add t0.w, c0.w, r1.w
mul t0.w, t0.w, t0.w
  + dp3 r1.xyz, c2, t0
mad r0.w, -t0.w, c2.w, c2.w
cnd t0.w, r0.w, c3.w, c4.w
  + mul r1.xyz, r1, c3
lrp r0.xyz, t0.w, r1, t0
  + mov r0.w, c4.w
// approximately 7 instruction slots used (1 texture, 6 arithmetic)
==== Very Bright ====
  ps_1_3
tex t0
mov_x2_sat r0, t0
// approximately 2 instruction slots used (1 texture, 1 arithmetic)
==== Super Bright Shader ====
ps_1_3
tex t0
mov_x4_sat r0, t0
// approximately 2 instruction slots used (1 texture, 1 arithmetic)
==== Desaturated ====
    ps_1_3
def c0, 0.300000012, 0.589999974, 0.109999999, 1
tex t0
mov_x2_sat r1, t0
dp3_x2_sat r0, t0, c0
lrp r0.xyz, r0, r1, r0
  + mov r0.w, c0
// approximately 4 instruction slots used (1 texture, 3 arithmetic)
== Other ==


[http://www.charlesriver.com/resrcs/chapters/1584503491_1stChap.pdf Shader Compile Tutorial] - Nice doc on how to set up Visual C++ to compile *.fx files.
[http://www.charlesriver.com/resrcs/chapters/1584503491_1stChap.pdf Shader Compile Tutorial] - Nice doc on how to set up Visual C++ to compile *.fx files.


[[Category:Tools]][[Category:Tools: Misc]]
[[Category:Tools]][[Category:Tools: Misc]]

Latest revision as of 07:50, 28 February 2012


Oblivion Shader Editor[edit | edit source]

By Timeslip

Description[edit | edit source]

This (sdp) is used to edit and compile the shader packages found in the shader folder inside the data folder in your TESIV: Oblivion.

Download[edit | edit source]

[timeslip.users.sourceforge.net/, Timeslip's utilities]

Warning! This utility might damage your shaders! Details: Oblivion shaders always contain CTAB (Constant TABles) which are used by the engine. If you disassemble and re-assemble the shader's code then resulting shader differs from the original. As a result some variables might be unbound resulting in ex. missing water animation or other similar problems.

Misc Shader Tools[edit | edit source]

Microsoft[edit | edit source]

Microsoft Game-writing tutorial - The german version is much better, with video tutorials and lots of shader coverage and a real worthy introduction to Agile development (De).

XNA - Microsoft's free and fully featured game development system, should be able to develop shaders.

DirectX SDK - Contains the DirectX Shader Compiler that creates the needed binary vso/pso files from HLSL or Assembler files.

Visual C++ Express Edition - The must-have IDE for free Windows programming.


NVIDIA[edit | edit source]

NVIDIA 3D Tools - Home of NVIDIA's vast archive of game development tools.

NVIDIA FX Composer - Shader development IDE for the HLSL, with preview and lots of useful tools.

NVIDIA SDK - Huge collection of examples, also shaders.

ATI[edit | edit source]

Ati's RenderMonkey - Ati's version of a shader development IDE.

Tutorials[edit | edit source]

Simple HLSL Shader Tutorial Gamestudio Wiki!

HLSL Shader Tutorial By Donald Beals

HLSL Shaders Microsoft

Pixel Shaders MSDN

MSL Tutorials MGE Shader Library

Examples[edit | edit source]

Night-Eye[edit | edit source]

Editing the Night-Eye Shader

Original Shader[edit | edit source]

	ps_1_3
	def c0, 1, 0, 0, -1
	def c2, 1, 1, 1, 0.5
	def c3, 0.209999993, 0.5, 0.779999971, 0
	def c4, 0, 0, 0, 1
	tex t0
	dp3 r1, c0, c1
	add t0.w, c0.w, r1.w
	mul t0.w, t0.w, t0.w
 + dp3 r1.xyz, c2, t0
	mad r0.w, -t0.w, c2.w, c2.w
	cnd t0.w, r0.w, c3.w, c4.w
 + mul r1.xyz, r1, c3
	lrp r0.xyz, t0.w, r1, t0
 + mov r0.w, c4.w
// approximately 7 instruction slots used (1 texture, 6 arithmetic)

Very Bright[edit | edit source]

 ps_1_3
	tex t0
	mov_x2_sat r0, t0

// approximately 2 instruction slots used (1 texture, 1 arithmetic)

Super Bright Shader[edit | edit source]

	ps_1_3
	tex t0
	mov_x4_sat r0, t0

// approximately 2 instruction slots used (1 texture, 1 arithmetic)

Desaturated[edit | edit source]

   ps_1_3
	def c0, 0.300000012, 0.589999974, 0.109999999, 1
	tex t0
	mov_x2_sat r1, t0
	dp3_x2_sat r0, t0, c0
	lrp r0.xyz, r0, r1, r0
  + mov r0.w, c0

// approximately 4 instruction slots used (1 texture, 3 arithmetic)

Other[edit | edit source]

Shader Compile Tutorial - Nice doc on how to set up Visual C++ to compile *.fx files.