View Issue Details

IDProjectCategoryView StatusLast Update
0007810New Feature Requests[All Projects] Generalpublic2017-06-18 20:57
ReporterSam@keAssigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status newResolutionopen 
Summary0007810: [Request] Please increase count of renderpasses for *.fx shader files
Description

I´m currently working on complete graphic overhaul using HLSL shaders and stuck since a few weeks on shadow mapping. Now im determine that *.fx files only allow one renderpass. More then one renderpasses were ignored, so isnt possible to create more complexe shaders like shadowmapping.

I think possibility to increase graphic quality will be a good reason to let MTA alife for next years. So i request to rework D3D9 API for allowing more then one pass per file.

Current state of my work:
http://www.youtube.com/watch?v=MA5ZnDJJnIw

Galery:
http://gallery.samake-gaming.de/#!home

With additional shadows it will be a good base for future possibilities.

Steps To Reproduce

I attached an shadow mapping example file of MicroSoft HLSL Development center, so you can see how those shader types will work.

TagsNo tags attached.

Users sponsoring this issue
Sponsors List Total Sponsorship = EUR 10

2013-09-05 00:56: Sam@ke (EUR 10)
Users sponsoring this issue (Total Sponsorship = EUR 10)

Activities

ccw

2013-09-07 11:26

administrator   ~~0019289

Nice work.
See here: https://wiki.multitheftauto.com/wiki/Element/Shader#Multiple_pass_shaders

If you mean something else, please explain.

Sam@ke

2013-09-07 12:29

viewer   ~~0019291

This wont work correctly. If there will be 3 passed, then shader should calculate all 3 return values after they were compiled. But it renders only last compiled pass.

Example:

float4 PixelShader1(float2 texCoords : TEXCOORD) : COLOR
{
return float4(1, 0, 0, 1); //red
}

float4 PixelShader2(float2 texCoords : TEXCOORD) : COLOR
{
return float4(0, 1, 0, 1); //green
}

float4 PixelShader3(float2 texCoords : TEXCOORD) : COLOR
{
return float4(0, 0, 1, 1); //blue
}

technique MultiPass
{
pass Red
{
PixelShader = compile ps_2_0 PixelShader1();
}
pass Green
{
PixelShader = compile ps_2_0 PixelShader2();
}
pass Blue
{
PixelShader = compile ps_2_0 PixelShader3();
}
}

50p

2013-09-07 12:54

reporter   ~~0019292

I think it is possible to do multi passes but you have to have 2 separate .fx files, each file doing 1 pass. For instance if you want to do gaussian blur you have to blur the screen horizontally and vertically, separately.

I'm not shader geek so I can't say how to do it but I've seen people do it.

Sam@ke

2013-09-16 02:23

viewer   ~~0019338

Last edited: 2013-09-16 02:23

View 2 revisions

For postprocessing shaders this workaround might be ok, but for depth shadow mapping this wont work. :(

Issue History

Date Modified Username Field Change