Welcome, Guest! Login | Register
Pbr shader
Info
Report
35 Posts

3drad supports hlsl shader language. Therefore it should support pbr shader if i am not wrong. Did anyone tried it in 3drad. I am planning to create a pbr shader but my knowledge is limited.
Created on: 4 months ago
Info
Report
305 Posts

Yes, 3D Rad does support HLSL language.

You could pull off a PBR shader in 3D Rad with enough patience. You could have the shader read from a set of textures in the skinmesh's folder. But it's user unintuitive. 3D Rad is just not designed for PBR shaders. They are relatively "new" to the public user base, keeping in mind that 3D Rad is deprecated since 2012 (8 years now).
Created on: 4 months ago
Info
Report
36 Posts

not possible, since PBR usually uses: occlusion/height/rough maps etc, and support for loading/rendering of those maps needs to be hard coded into 3drad's engine itself - not by user HLSL scripts. 3drad only supports spec/light/fresnel/reflection/normal/glow/RGB/alpha maps.

the best you can achieve is to convert existing shaders that use said maps, such as nvidia's ddGodRays shader that is sourced from an alpha map [unlike 3drad's cam sourced godrays] http://developer.download.nvidia.com/shaderlibrary/webpages/hlsl_shaders.html i started working on just that, and may try to finish it one day, but it's harder than i thought, you have to rename/rearrange the code to suit 3drad's custom built in functions, who's documentation is very limited or lost forever...
also, there was an attempt by gene transfer to make a 'fake' thickness map shader so i suggest to look at that. since some of his and shadmars were based on xbox or nvidia shaders it's the best way to learn by comparing 3drad code changes from original.
Created on: 4 months ago
Edited on: 3 months ago
Info
Report
36 Posts

you may want too look at nvidia's Relief_Mapping shader linked above. it does Parallax Mapping and Relief Mapping with Shadows using a normal map. as seen in the examples images i attached, this is pretty close to PBR but without roughness, which could be faked using a spec map for metal, etc.

let us know if you have any luck, even if you don't want to share your code just knowing it can be done is a great help.
Created on: 3 months ago
Info
Report
36 Posts

...i since found the reason 3drad does [NOT] support loading PBR maps is PBR uses geometry shaders which are DirectX 10/Shader Model 4.

most, if not all the shaders on my nvidia link above have dual dx9+10/SM3+4 versions [even the ones listed as 'DirectX10 textured'] so are compatible to convert the dx9/SM3 portion of the code.
Created on: 2 months ago
Edited on: 2 months ago
Info
Report
36 Posts

edit to above: 'does [NOT] support loading PBR maps'...oops forgot the 'not'.

attached are the 2 examples i used to try a conversion, spent numerous days, now i just modify the working godrays instead. i made some //--------modified and 'nv' = nvidia notes to genes version.
Created on: 2 months ago
Edited on: 2 months ago
Info
Report
35 Posts

Is there is something like directx 9 pbr shader. I searched on internet. I found this
https://forum.substance3d.com/index.php?topic=3236.0
Created on: 2 months ago
Info
Report
36 Posts

i already showed you the closest thing: nvidia's relief mapping shader.

actual PBR [Physically Based Rendering] is not possible as i explained above. PBR uses occlusion and height mapping which <physically> changes geometry and was an evolution of Relief/Parallax Mapping which only simulates geometry changes using various tricks.
Created on: 2 months ago
Info
Report
161 Posts

InJeCt A DiReCt X WInApI32 hOoK iNtO 3D rAd AnD dRaw YouR owN StUfF - idk who, totally not me
Created on: 2 months ago
Info
Report
36 Posts

that won't work either, an injector/wrapper could convert dx9 code to run on dx10,  but not run dx10 code from a dx9 engine [so no dx10 geometry shaders].

only way to do that is to engineer an upgrade of 3drad's dx9 integration to dx10, which is likely illegal reverse engineering.
Created on: 2 months ago
Edited on: 2 months ago
Info
Report
35 Posts

I dont know much about game engine programming. I understand that the game engine must include some code to handle geomatric data. The shader is dependent on game engine? I have an impression that any hlsl shader can be created independently.
Created on: 2 months ago
Info
Report
161 Posts

Quote from: thelurker

that won't work either, an injector/wrapper could convert dx9 code to run on dx10,  but not run dx10 code from a dx9 engine [so no dx10 geometry shaders].

only way to do that is to engineer an upgrade of 3drad's dx9 integration to dx10, which is likely illegal reverse engineering.

I was sarcastic. Anyways, there are separate DLL hooks to convert DX9 to DX10 as far as I know.

As I know, you set the supported version as a enum value/flag in the ID3D11CreateDevice function.
Created on: 2 months ago
Edited on: 2 months ago
Info
Report
36 Posts

@jayburn: buy that reasoning, what's to stop you using dx12/shader model 6 in a dx9/SM3 engine too then? heck, why would people ever bother upgrading an engine if that's the case?

@atha: yeh like i said, dx9 to dx10 is no problem [it runs dx9 code as dx10 downgraded equivalents, but does not add the new dx10 features], but running dx10 code FROM dx9 engine is the issue here - if you write dx10 code in 3drad it will refuse to run it because it has no built in understanding of the new parameters, let alone how to pass them on to the GPU.

@both: an injector like reshade can't even do normal maps, let alone height maps, as quoted from the dev crosire: https://reshade.me/forum/shader-suggestions/3141-shader-request#21768
-so if you want to do geometry shading, it must be done in-engine, not by injecting post processing shaders, period.
Created on: 2 months ago
Edited on: 2 months ago
Reply
Preview
Post
Or use the advanced reply form here...
Sponsored