3Dmigoto now open-source...
  46 / 141    
Is it possible somehow to change the D3D11_TEXTURE_ADDRESS_MODE of a sampler? I do not like how bloom behaves on the edges of the scren, so I was wondering If I could somehowe change the sampler's UV mode from clamp to border. There is one thing though what I'm dreaming about. Beeing able to render the frame to the separate frame buffers in multiple passes. I could then implement kawase-bloom which is way better than this downsampled piece of crap which I have to struggle with at the moment. Crepuscular rays would be possible to implement also :) Mmmmmm... dreams...
Is it possible somehow to change the D3D11_TEXTURE_ADDRESS_MODE of a sampler? I do not like how bloom behaves on the edges of the scren, so I was wondering If I could somehowe change the sampler's UV mode from clamp to border.

There is one thing though what I'm dreaming about. Beeing able to render the frame to the separate frame buffers in multiple passes. I could then implement kawase-bloom which is way better than this downsampled piece of crap which I have to struggle with at the moment. Crepuscular rays would be possible to implement also :) Mmmmmm... dreams...

EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64

Posted 12/27/2015 06:51 PM   
[quote="DarkStarSword"][quote="Oomek"]Guys, is that method of referencing a new rendertarget allowed?[/quote]It looks ok, so it's most likely a bug in the resource assignment code. I think I might know what the issue is - I bet it's the fact I'm caching a view of the resource, but here I would need two separate views (one for when it is used as a render target and a separate view for when it is used as a texture). I'll get an update out asap to address this.[/quote]So this was not the issue - the views for each copy operation are already cached independently (seems I already considered this case after all). I think the problem is more likely that you are only getting the headlights from the most recent draw call in some cases. There's two problems here - the first is by copying o0 each time the lights are drawn it will wipe out the previous contents of ResourceHeadlights and replace it with o0. Once I have the code to just make sure the render target is compatible without doing a copy you will be able to use that, but in the meantime you can add max_copies_per_frame=1 to the resource definition so that it will only be wiped the first time the shader is used in the frame. The second issue will take a bit more work - I had a look at Dirt 3 and it seems that the output merger state is not consistent for the second render target - sometimes it is set to blend (so you will get all the headlights), and other times it is set not to (so you will only get the most recently drawn). To solve this I'll need to add a feature to set the output merger to whatever you need. But this wouldn't explain why it worked when you set it to copy instead of reference (I'm getting the same results either way) - can you send me your WIP so I can make sure I'm looking at the same issue? Also, just on a haunch - if you have SLI see if anything changes if you disable it. [quote="Oomek"]Is it possible somehow to change the D3D11_TEXTURE_ADDRESS_MODE of a sampler? I do not like how bloom behaves on the edges of the scren, so I was wondering If I could somehowe change the sampler's UV mode from clamp to border.[/quote]Not currently, but I might as well add it while I work on customising the output merger since I suspect the code will end up being similar. [quote]There is one thing though what I'm dreaming about. Beeing able to render the frame to the separate frame buffers in multiple passes. I could then implement kawase-bloom which is way better than this downsampled piece of crap which I have to struggle with at the moment. Crepuscular rays would be possible to implement also :) Mmmmmm... dreams...[/quote]If you can give me a clearer idea of exactly what you will need for this I might be able to add something (although I probably won't make this a high priority).
DarkStarSword said:
Oomek said:Guys, is that method of referencing a new rendertarget allowed?
It looks ok, so it's most likely a bug in the resource assignment code. I think I might know what the issue is - I bet it's the fact I'm caching a view of the resource, but here I would need two separate views (one for when it is used as a render target and a separate view for when it is used as a texture). I'll get an update out asap to address this.
So this was not the issue - the views for each copy operation are already cached independently (seems I already considered this case after all). I think the problem is more likely that you are only getting the headlights from the most recent draw call in some cases.

There's two problems here - the first is by copying o0 each time the lights are drawn it will wipe out the previous contents of ResourceHeadlights and replace it with o0. Once I have the code to just make sure the render target is compatible without doing a copy you will be able to use that, but in the meantime you can add max_copies_per_frame=1 to the resource definition so that it will only be wiped the first time the shader is used in the frame.

The second issue will take a bit more work - I had a look at Dirt 3 and it seems that the output merger state is not consistent for the second render target - sometimes it is set to blend (so you will get all the headlights), and other times it is set not to (so you will only get the most recently drawn). To solve this I'll need to add a feature to set the output merger to whatever you need.

But this wouldn't explain why it worked when you set it to copy instead of reference (I'm getting the same results either way) - can you send me your WIP so I can make sure I'm looking at the same issue? Also, just on a haunch - if you have SLI see if anything changes if you disable it.

Oomek said:Is it possible somehow to change the D3D11_TEXTURE_ADDRESS_MODE of a sampler? I do not like how bloom behaves on the edges of the scren, so I was wondering If I could somehowe change the sampler's UV mode from clamp to border.
Not currently, but I might as well add it while I work on customising the output merger since I suspect the code will end up being similar.

There is one thing though what I'm dreaming about. Beeing able to render the frame to the separate frame buffers in multiple passes. I could then implement kawase-bloom which is way better than this downsampled piece of crap which I have to struggle with at the moment. Crepuscular rays would be possible to implement also :) Mmmmmm... dreams...
If you can give me a clearer idea of exactly what you will need for this I might be able to add something (although I probably won't make this a high priority).

2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit

Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD

Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword

Posted 12/28/2015 08:39 AM   
[quote="lefuneste"][quote="DarkStarSword"]at the moment it is not possible to change the StereoParams register, but should be fairly straight forward to allow that, so I'll add it as a high priority item on my TODO list and you can expect an update in the next couple of days to allow it.[/quote] Thanks a lot![/quote]Done in 3DMigoto 1.2.20 - you can now change stereo_params=125 and ini_params=120 in the d3dx.ini. Newly dumped shaders will have the right definition in the header, but you will have to to edit the definitions in any shaders already in ShadersFixes, and if you use ShaderCache you might want to blow it away to get fresh copies.
lefuneste said:
DarkStarSword said:at the moment it is not possible to change the StereoParams register, but should be fairly straight forward to allow that, so I'll add it as a high priority item on my TODO list and you can expect an update in the next couple of days to allow it.

Thanks a lot!
Done in 3DMigoto 1.2.20 - you can now change stereo_params=125 and ini_params=120 in the d3dx.ini. Newly dumped shaders will have the right definition in the header, but you will have to to edit the definitions in any shaders already in ShadersFixes, and if you use ShaderCache you might want to blow it away to get fresh copies.

2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit

Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD

Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword

Posted 12/28/2015 08:45 AM   
Thanks, I'll try what you suggested and if that doesn't work I'll prepare a debug view of the headlights on a clean game tomorrow as today is the day. I'm going to the cinema to watch SW VII so I have to have a good rest before that. I suffer from fibromyalgia, my energy levels are somehow limited. Regarding the idea of a multipass shaders. I would need the ability to define a new shader which renders to 2 intermediate buffers, so the output becomes input in each pass. The shader should have a defined number of passes in the ini file. Ideally It should be able to take the input in form of texture2D from some previously run shader in the frame with extra render target just for this purpose, but only on the 1st pass. Inside that shader I would need a variable in the CB telling me which pass I'm currently running, it's a must for iterative filters like kawase blur. When all the passes are complete I could use that output in some other shader and mix that with the scene. I don't know if it's even possible to do, looks like a lot of work.
Thanks, I'll try what you suggested and if that doesn't work I'll prepare a debug view of the headlights on a clean game tomorrow as today is the day. I'm going to the cinema to watch SW VII so I have to have a good rest before that. I suffer from fibromyalgia, my energy levels are somehow limited.

Regarding the idea of a multipass shaders. I would need the ability to define a new shader which renders to 2 intermediate buffers, so the output becomes input in each pass. The shader should have a defined number of passes in the ini file. Ideally It should be able to take the input in form of texture2D from some previously run shader in the frame with extra render target just for this purpose, but only on the 1st pass. Inside that shader I would need a variable in the CB telling me which pass I'm currently running, it's a must for iterative filters like kawase blur. When all the passes are complete I could use that output in some other shader and mix that with the scene.

I don't know if it's even possible to do, looks like a lot of work.

EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64

Posted 12/28/2015 10:50 AM   
I'm sorry if this question already was discussed here but I couldn't find it: can 3Dmigoto also be used/expanded to work as a texture wrapper for Dx 11 games? So that it can replace textures in games like TexMod or uMod does for Dx 9 games?
I'm sorry if this question already was discussed here but I couldn't find it: can 3Dmigoto also be used/expanded to work as a texture wrapper for Dx 11 games? So that it can replace textures in games like TexMod or uMod does for Dx 9 games?

My original display name is 3d4dd - for some reason Nvidia changed it..?!

Posted 12/28/2015 05:25 PM   
[quote="3d4dd"]I'm sorry if this question already was discussed here but I couldn't find it: can 3Dmigoto also be used/expanded to work as a texture wrapper for Dx 11 games? So that it can replace textures in games like TexMod or uMod does for Dx 9 games?[/quote]Yeah, you should be able to do that now with something like this: [code] ; Create custom resources from files: [ResourceReplaceTexture1] filename = ReplacementTextures\foo.jpg ; Match a shader used to draw the texture to be replaced (can match VS or PS) ; and use checktextureoverride on the texture slot with the texture to be ; replaced, which will enable certain commands in the TextureOverride section [ShaderOverride1] Hash = xxx checktextureoverride = ps-t0 ; The TextureOverride matches the texture to be replaced, and will replace the ; texture in pixel shader texture slot 0 (ps-t0) with the custom resource. ; The ps-t0 line will only be run if checktextureoverride was used to match ; this texture from a ShaderOverride section (for performance reasons) [TextureOverride1] Hash = yyy ps-t0 = ResourceReplaceTexture1] [/code] These features were introduced in 3DMigtoo 1.2.11, and should work in anything more recent than that.
3d4dd said:I'm sorry if this question already was discussed here but I couldn't find it: can 3Dmigoto also be used/expanded to work as a texture wrapper for Dx 11 games? So that it can replace textures in games like TexMod or uMod does for Dx 9 games?
Yeah, you should be able to do that now with something like this:
; Create custom resources from files:
[ResourceReplaceTexture1]
filename = ReplacementTextures\foo.jpg

; Match a shader used to draw the texture to be replaced (can match VS or PS)
; and use checktextureoverride on the texture slot with the texture to be
; replaced, which will enable certain commands in the TextureOverride section
[ShaderOverride1]
Hash = xxx
checktextureoverride = ps-t0

; The TextureOverride matches the texture to be replaced, and will replace the
; texture in pixel shader texture slot 0 (ps-t0) with the custom resource.
; The ps-t0 line will only be run if checktextureoverride was used to match
; this texture from a ShaderOverride section (for performance reasons)
[TextureOverride1]
Hash = yyy
ps-t0 = ResourceReplaceTexture1]

These features were introduced in 3DMigtoo 1.2.11, and should work in anything more recent than that.

2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit

Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD

Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword

Posted 12/29/2015 10:36 AM   
Omg! I've just found out how bad Bloom is in Dirt 3. The downsampling factor is 16!!! no 2, 4 even 8, but f****** 16 :D Now I know why I have such a big shimmering effect on every small light source. It's like trying to resuscitate a fly with CPR :) I'm done with this s***. I have no option but to hope that some day my wishful thinking will fulfill and I'll be able to create my own shaders on my own terms. disgusting... [img]http://i.imgur.com/vdHehaJ.png[/img]
Omg! I've just found out how bad Bloom is in Dirt 3. The downsampling factor is 16!!! no 2, 4 even 8, but f****** 16 :D Now I know why I have such a big shimmering effect on every small light source. It's like trying to resuscitate a fly with CPR :) I'm done with this s***. I have no option but to hope that some day my wishful thinking will fulfill and I'll be able to create my own shaders on my own terms.

disgusting...

Image

EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64

Posted 12/29/2015 02:17 PM   
[quote="DarkStarSword"] These features were introduced in 3DMigtoo 1.2.11, and should work in anything more recent than that.[/quote] Great news! A feature like this could make 3DMigoto very popular even for 2D players as there is no texture wrapper for Dx 11 as far as I know... On the other hand - maybe it's better if 3DMigoto remains an insider tip and game developers don't get aware of it and block it because of possible misuse for cheating, ect. :(
DarkStarSword said:
These features were introduced in 3DMigtoo 1.2.11, and should work in anything more recent than that.

Great news! A feature like this could make 3DMigoto very popular even for 2D players as there is no texture wrapper for Dx 11 as far as I know... On the other hand - maybe it's better if 3DMigoto remains an insider tip and game developers don't get aware of it and block it because of possible misuse for cheating, ect. :(

My original display name is 3d4dd - for some reason Nvidia changed it..?!

Posted 12/29/2015 06:08 PM   
Yeah, the feature was intended to inject new textures into a game like this one: [img]https://raw.githubusercontent.com/bo3b/3Dmigoto/master/FC4/ShaderFixes/hud-mask.png[/img] I use this to divide the HUD in FC4 up into several regions - the green ellipse in the middle is where floating icons are allowed to auto adjust their depth and the red on the left is where the minimap is drawn so all icons there must be adjusted to the same depth as each other. And then there's this: [img]https://raw.githubusercontent.com/bo3b/3Dmigoto/master/FC4/ShaderFixes/82efdcb5-icon-filter.png[/img] That texture was dumped out with "analyse_options=dump_tex mono" and holds a bunch of icons which need different adjustments, so texture filtering alone was insufficient. I started checking the texture coordinates, but that was error prone and time consuming, so I decided to just paint over the icons with a colour that the shader could use to determine which adjustment to make and reinject it into the game. Blue is for crosshair icons (adjust based on center of screen), green for floating icons (adjust based on position of center of icon), purple for multiple purposes (decide based on hud filter), red for anything that I tried adjusting but turned out to be a bad idea. I slightly desaturated the existing icons first to make sure nothing there would already have one of these colours. The fact that it can also be used to replace textures from the game is just a consequence of making the feature generic.
Yeah, the feature was intended to inject new textures into a game like this one:

Image

I use this to divide the HUD in FC4 up into several regions - the green ellipse in the middle is where floating icons are allowed to auto adjust their depth and the red on the left is where the minimap is drawn so all icons there must be adjusted to the same depth as each other.

And then there's this:

Image

That texture was dumped out with "analyse_options=dump_tex mono" and holds a bunch of icons which need different adjustments, so texture filtering alone was insufficient. I started checking the texture coordinates, but that was error prone and time consuming, so I decided to just paint over the icons with a colour that the shader could use to determine which adjustment to make and reinject it into the game.

Blue is for crosshair icons (adjust based on center of screen), green for floating icons (adjust based on position of center of icon), purple for multiple purposes (decide based on hud filter), red for anything that I tried adjusting but turned out to be a bad idea. I slightly desaturated the existing icons first to make sure nothing there would already have one of these colours.

The fact that it can also be used to replace textures from the game is just a consequence of making the feature generic.

2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit

Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD

Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword

Posted 12/30/2015 02:48 AM   
[center][color="orange"]3DMigoto 1.2.21:[/color] [url]https://github.com/bo3b/3Dmigoto/releases/tag/1.2.21[/url][/center] This release adds a log option to frame analysis, which will log every call the game makes to the device context(s) in a log.txt in the frame analysis directory. The log includes shader and texture hashes and handles whenever they are assigned. This should be useful for cases where you don't want a full frame analysis dump, when the full dump is incomplete, or to gain insights into other calls the game may do that don't show up in the full dump (e.g. this will show when resources are mapped to the CPU or copied on the GPU, when deferred context command lists are run, etc). Please test this new version even if you aren't using this feature and report any new crashes that weren't in 1.2.20 - it might sound like a trivial feature, but modifying this many routines has real potential for introducing new bugs. This release also fixes the frame analysis filenames of textures and constant buffers for compute shaders. This release also includes a decompiler bug fix that was adding a "constant" modifier on some inputs that should have been "nointerpolation" - affected shaders would be obvious as they would fail to compile.


This release adds a log option to frame analysis, which will log every call the game makes to the device context(s) in a log.txt in the frame analysis directory. The log includes shader and texture hashes and handles whenever they are assigned. This should be useful for cases where you don't want a full frame analysis dump, when the full dump is incomplete, or to gain insights into other calls the game may do that don't show up in the full dump (e.g. this will show when resources are mapped to the CPU or copied on the GPU, when deferred context command lists are run, etc).

Please test this new version even if you aren't using this feature and report any new crashes that weren't in 1.2.20 - it might sound like a trivial feature, but modifying this many routines has real potential for introducing new bugs.

This release also fixes the frame analysis filenames of textures and constant buffers for compute shaders.

This release also includes a decompiler bug fix that was adding a "constant" modifier on some inputs that should have been "nointerpolation" - affected shaders would be obvious as they would fail to compile.

2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit

Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD

Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword

Posted 12/30/2015 02:55 PM   
Cool - I'll try this out on Batman Arkham Knight :-)
Cool - I'll try this out on Batman Arkham Knight :-)

Rig: Intel i7-8700K @4.7GHz, 16Gb Ram, SSD, GTX 1080Ti, Win10x64, Asus VG278

Posted 12/30/2015 03:06 PM   
[quote="DarkStarSword"][quote="DarkStarSword"][quote="Oomek"]Guys, is that method of referencing a new rendertarget allowed?[/quote]It looks ok, so it's most likely a bug in the resource assignment code. I think I might know what the issue is - I bet it's the fact I'm caching a view of the resource, but here I would need two separate views (one for when it is used as a render target and a separate view for when it is used as a texture). I'll get an update out asap to address this.[/quote]So this was not the issue - the views for each copy operation are already cached independently (seems I already considered this case after all). I think the problem is more likely that you are only getting the headlights from the most recent draw call in some cases. There's two problems here - the first is by copying o0 each time the lights are drawn it will wipe out the previous contents of ResourceHeadlights and replace it with o0. Once I have the code to just make sure the render target is compatible without doing a copy you will be able to use that, but in the meantime you can add max_copies_per_frame=1 to the resource definition so that it will only be wiped the first time the shader is used in the frame. The second issue will take a bit more work - I had a look at Dirt 3 and it seems that the output merger state is not consistent for the second render target - sometimes it is set to blend (so you will get all the headlights), and other times it is set not to (so you will only get the most recently drawn). To solve this I'll need to add a feature to set the output merger to whatever you need. But this wouldn't explain why it worked when you set it to copy instead of reference (I'm getting the same results either way) - can you send me your WIP so I can make sure I'm looking at the same issue? Also, just on a haunch - if you have SLI see if anything changes if you disable it. [quote="Oomek"]Is it possible somehow to change the D3D11_TEXTURE_ADDRESS_MODE of a sampler? I do not like how bloom behaves on the edges of the scren, so I was wondering If I could somehowe change the sampler's UV mode from clamp to border.[/quote]Not currently, but I might as well add it while I work on customising the output merger since I suspect the code will end up being similar. [quote]There is one thing though what I'm dreaming about. Beeing able to render the frame to the separate frame buffers in multiple passes. I could then implement kawase-bloom which is way better than this downsampled piece of crap which I have to struggle with at the moment. Crepuscular rays would be possible to implement also :) Mmmmmm... dreams...[/quote]If you can give me a clearer idea of exactly what you will need for this I might be able to add something (although I probably won't make this a high priority). [/quote] I set max_copies_per_frame=1 but I'm still getting more in the o1 than I need. I'm trying to mask out the bloom of the menu. I'm copying the mask of the ingame menu to a new rendertarget but when I'm referencing it in a mixdown shaders I'm getting menu and the car. [img]http://i.imgur.com/jKXkhhr.jpg[/img] [img]http://i.imgur.com/b5UltVp.png[/img] [code][ResourceOverlayMask1] max_copies_per_frame=1 [ShaderOverride-3f260ece3b503ff0] Hash = 3f260ece3b503ff0 ResourceOverlayMask1 = copy o0 o1 = reference ResourceOverlayMask1 post o1 = null [ResourceOverlayMask2] max_copies_per_frame=1 [ShaderOverride-cb073e8d10857112] Hash = cb073e8d10857112 ResourceOverlayMask2 = copy o0 o1 = reference ResourceOverlayMask2 post o1 = null [ShaderOverride-dfcdc4e8b0ac57d3] Hash = dfcdc4e8b0ac57d3 ps-t113 = reference ResourceOverlayMask1 post ps-t113 = null ps-t114 = reference ResourceOverlayMask2 post ps-t114 = null [ShaderOverride-6cd8caedcd2fa043] Hash = 6cd8caedcd2fa043 ps-t113 = reference ResourceOverlayMask1 post ps-t113 = null ps-t114 = reference ResourceOverlayMask2 post ps-t114 = null[/code]
DarkStarSword said:
DarkStarSword said:
Oomek said:Guys, is that method of referencing a new rendertarget allowed?
It looks ok, so it's most likely a bug in the resource assignment code. I think I might know what the issue is - I bet it's the fact I'm caching a view of the resource, but here I would need two separate views (one for when it is used as a render target and a separate view for when it is used as a texture). I'll get an update out asap to address this.
So this was not the issue - the views for each copy operation are already cached independently (seems I already considered this case after all). I think the problem is more likely that you are only getting the headlights from the most recent draw call in some cases.

There's two problems here - the first is by copying o0 each time the lights are drawn it will wipe out the previous contents of ResourceHeadlights and replace it with o0. Once I have the code to just make sure the render target is compatible without doing a copy you will be able to use that, but in the meantime you can add max_copies_per_frame=1 to the resource definition so that it will only be wiped the first time the shader is used in the frame.

The second issue will take a bit more work - I had a look at Dirt 3 and it seems that the output merger state is not consistent for the second render target - sometimes it is set to blend (so you will get all the headlights), and other times it is set not to (so you will only get the most recently drawn). To solve this I'll need to add a feature to set the output merger to whatever you need.

But this wouldn't explain why it worked when you set it to copy instead of reference (I'm getting the same results either way) - can you send me your WIP so I can make sure I'm looking at the same issue? Also, just on a haunch - if you have SLI see if anything changes if you disable it.

Oomek said:Is it possible somehow to change the D3D11_TEXTURE_ADDRESS_MODE of a sampler? I do not like how bloom behaves on the edges of the scren, so I was wondering If I could somehowe change the sampler's UV mode from clamp to border.
Not currently, but I might as well add it while I work on customising the output merger since I suspect the code will end up being similar.

There is one thing though what I'm dreaming about. Beeing able to render the frame to the separate frame buffers in multiple passes. I could then implement kawase-bloom which is way better than this downsampled piece of crap which I have to struggle with at the moment. Crepuscular rays would be possible to implement also :) Mmmmmm... dreams...
If you can give me a clearer idea of exactly what you will need for this I might be able to add something (although I probably won't make this a high priority).


I set max_copies_per_frame=1 but I'm still getting more in the o1 than I need.

I'm trying to mask out the bloom of the menu.
I'm copying the mask of the ingame menu to a new rendertarget but when I'm referencing it in a mixdown shaders I'm getting menu and the car.

Image

Image

[ResourceOverlayMask1]
max_copies_per_frame=1
[ShaderOverride-3f260ece3b503ff0]
Hash = 3f260ece3b503ff0
ResourceOverlayMask1 = copy o0
o1 = reference ResourceOverlayMask1
post o1 = null

[ResourceOverlayMask2]
max_copies_per_frame=1
[ShaderOverride-cb073e8d10857112]
Hash = cb073e8d10857112
ResourceOverlayMask2 = copy o0
o1 = reference ResourceOverlayMask2
post o1 = null

[ShaderOverride-dfcdc4e8b0ac57d3]
Hash = dfcdc4e8b0ac57d3
ps-t113 = reference ResourceOverlayMask1
post ps-t113 = null
ps-t114 = reference ResourceOverlayMask2
post ps-t114 = null

[ShaderOverride-6cd8caedcd2fa043]
Hash = 6cd8caedcd2fa043
ps-t113 = reference ResourceOverlayMask1
post ps-t113 = null
ps-t114 = reference ResourceOverlayMask2
post ps-t114 = null

EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64

Posted 12/31/2015 07:00 PM   
@DarkStarSword, I've sent you the link to some debug shaders in PM.
@DarkStarSword, I've sent you the link to some debug shaders in PM.

EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64

Posted 01/01/2016 03:25 PM   
Thanks for that - I'll take a look at it a bit later.
Thanks for that - I'll take a look at it a bit later.

2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit

Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD

Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword

Posted 01/02/2016 04:10 AM   
I really hope you will figure out something, because using new render targets is completely unpredictable now. I get random stuff in the resource textures. I wanted for example copy just the sun from the sky shader, but when I reference to it I get also half of the ground objects which are drawn to the same render target by other shaders. Edit: it's very strange because that particular shader is used only once in the frame.
I really hope you will figure out something, because using new render targets is completely unpredictable now. I get random stuff in the resource textures. I wanted for example copy just the sun from the sky shader, but when I reference to it I get also half of the ground objects which are drawn to the same render target by other shaders.

Edit: it's very strange because that particular shader is used only once in the frame.

EVGA GeForce GTX 980 SC
Core i5 2500K
MSI Z77A-G45
8GB DDR3
Windows 10 x64

Posted 01/04/2016 12:54 AM   
  46 / 141    
Scroll To Top