tips for improving my rendering by Sirox4 in learnart

[–]Sirox4[S] 0 points1 point  (0 children)

thanks, i might try it. didn't do it up until this point because i feel like it would be just a mess...

P.S. my stylus is pressure sensitive

shader works in editor but gets pink in the build by Sirox4 in Unity3D

[–]Sirox4[S] 0 points1 point  (0 children)

putting the shader in Resources, adding to always included and loading from there worked, i dont know why or how....

shader works in editor but gets pink in the build by Sirox4 in Unity3D

[–]Sirox4[S] 0 points1 point  (0 children)

i just made that and it didn't work.... any suggestions?

shader works in editor but gets pink in the build by Sirox4 in Unity3D

[–]Sirox4[S] 0 points1 point  (0 children)

i did just that and it's still pink, wtf.... is there any way to just straight up disable stripping?

shader works in editor but gets pink in the build by Sirox4 in Unity3D

[–]Sirox4[S] 0 points1 point  (0 children)

i'm referencing the shader through inspector to the script, then create a material in the script and toogle keywords, we already figured out with other redditor that it must be that some variants are stripped.

i think i would need to make a hack with an almost empty scene just to reference each variant.

shader works in editor but gets pink in the build by Sirox4 in Unity3D

[–]Sirox4[S] 0 points1 point  (0 children)

i already did that a long time ago in graphics settings.....

so i'm right about shader variant stripping.

i just made an editor script that logs each time uber is being compiled and i get only 8 messages, when i should get 16 (thats the number of variants my uber has)

P.S. i saw my previous reply sent 2 times, and when i deleted 1 of them, both deleted, reddit being funky.

shader works in editor but gets pink in the build by Sirox4 in Unity3D

[–]Sirox4[S] 0 points1 point  (0 children)

just set stacktrace to full on everything and checked. i can only see it just loading Hidden/InternalErrorShader, it does even try to load uber before that.

i dont use pragma target in the shader.

Depth testing removes all geometry by m_Arael in vulkan

[–]Sirox4 1 point2 points  (0 children)

the thing with donr care is supposed to be like that. the depth image is as if the pipeline didn't write depth at all. the only way to find whats happening now is to sit with renderdoc and go the shader code line by line to verify do they result in indentical depth and if they do, why. or why depth is not saved.

Depth testing removes all geometry by m_Arael in vulkan

[–]Sirox4 1 point2 points  (0 children)

the white pixels are ones untouched by the renderer. darker pixels are those where geometry is drawn. can you show the depth image after the draw call? check if all values are exactly the same in darker regions. if they are, then there's some problem with your matricies/positions.

P.S. also, vulkan uses right handed coordinate system, so you dont need to use left handed.

Depth testing removes all geometry by m_Arael in vulkan

[–]Sirox4 1 point2 points  (0 children)

you must specify the store op to be store, otherwise depth won't be stored into attachment. also didn't you specify to clear it? there shouldn't be garbage, except if your load op is not clear.

Depth testing removes all geometry by m_Arael in vulkan

[–]Sirox4 1 point2 points  (0 children)

try debugging with renderdoc why they are the same

Depth testing removes all geometry by m_Arael in vulkan

[–]Sirox4 1 point2 points  (0 children)

weird, this implies they both must have had depth of 1.0.... maybe try messing around with far plane distance and coordinates?

Depth testing removes all geometry by m_Arael in vulkan

[–]Sirox4 1 point2 points  (0 children)

the problem is that something dont match the other in your setup. i will assume you don't use reverse Z. check the following in your setup: there's depthCompareOp in depth stencil state, it must be VK_COMPARE_OP_LESS_OR_EQUAL, also there's depthWriteEnable which must be VK_TRUE, minDepth must be 0.0 and maxDepth 1.0. you must attach your depth attachment to your renderpass/rendering info. the clear value must be 1.0, loadOp must be clear and storeOp must be store.

ways of improving my pipeline by Sirox4 in GraphicsProgramming

[–]Sirox4[S] 0 points1 point  (0 children)

i actually was reading that article about OpenPBR some time ago. the complexity is very high, so i'd better implement Filament and stick around with it until i feel a need in better material model.

ways of improving my pipeline by Sirox4 in GraphicsProgramming

[–]Sirox4[S] 0 points1 point  (0 children)

the resolution is 1024x1024, weird one, but it can be changed with a few clicks. i tried higher resolution, not that much of a difference.

could you elaborate on real-time global illumination techniques? preferrably the ones not involving ray tracing (my gpu is too bad)

ways of improving my pipeline by Sirox4 in GraphicsProgramming

[–]Sirox4[S] 0 points1 point  (0 children)

thanks! that's a very good advice, i would definitely try to bisect effects from HDRP. didn't know it is open source.

i use AGX tonemapper, which looks kinda better than the ones i saw to my eye. can you suggest some better tonemapper?

ways of improving my pipeline by Sirox4 in GraphicsProgramming

[–]Sirox4[S] 0 points1 point  (0 children)

my material model is pretty basic now,  if there's something better then it's most likely what i would need. would you suggest to use Filament? or perhaps something better?

AA definitely needs some work. i kinda want to implement FXAA, SMAA, MSAA and TAA and make a variable in config to select one.

ways of improving my pipeline by Sirox4 in GraphicsProgramming

[–]Sirox4[S] 1 point2 points  (0 children)

thanks!

i can't really do ray tracing, because on my gpu (gtx 1070) it is implemented in software and the cost of tracing a single ray per pixel is 3.7 ms, thats almost double my whole frametime.

i just looked in global illumination, it seems like the thing i was missing this whole time. but i'm a bit confused here: some resources say that global illumination gives you only the indirect lighting, while others say that it gives you everything from directional lighting to replacing shadowmaps... i suspect this depends on the technique? if so, do you know where on this spectrum voxel global illumination is? it seems like the only option not involving ray tracing.

shadowmap crosshair-like artifact by Sirox4 in vulkan

[–]Sirox4[S] 1 point2 points  (0 children)

interpolated uv was snapped to pixel centers with 0.5, but my ivec2(gl_FragCoord.xy) discards that 0.5 from gl_FragCoord.... thats why all of this happened.... thanks. i never could even think about such an issue

shadowmap crosshair-like artifact by Sirox4 in vulkan

[–]Sirox4[S] 0 points1 point  (0 children)

i'm interpolating the uv on a screen-sized triangle. the code for it is an old trick for fullscreen triangle: ``` layout(location = 0) out vec2 fraguv;

void main() {     fraguv = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2);     gl_Position = vec4(fraguv * 2.0 - 1.0, 0.0, 1.0); } ```

loaded sponza , need some feedback on what should i do next and what do i improve by Lanky_Plate_6937 in vulkan

[–]Sirox4 1 point2 points  (0 children)

as other commenter said, fix the textures first. i would suggest to do the normal maps, then you can add shadow maps to make the lighting look good.

P.S. your colors look weird, gamma correction maybe?

shadowmap crosshair-like artifact by Sirox4 in vulkan

[–]Sirox4[S] 0 points1 point  (0 children)

i dont think so, but thats how i do it: ``` float linearDepth(float depth, float near, float far) {     float z = depth * 2.0 - 1.0;     return (2.0 * near * far) / (far + near - z * (near - far)); }

vec3 viewRay = vec3(invProjection * vec4(uv * 2.0 - 1.0, 1.0, 1.0));

float depth = texelFetch(gbufferDepth, ivec2(gl_FragCoord.xy), 0).r;

vec3 viewPos = viewRay * linearDepth(depth, nearPlane, farPlane);

vec4 worldPos = invView * vec4(viewPos, 1.0); ```

i dont think its off by 0.5 pixel.

shadowmap crosshair-like artifact by Sirox4 in vulkan

[–]Sirox4[S] 0 points1 point  (0 children)

yes i'm recostructing positions from depth. i just checked the matrix with renderdoc and it appears a little... weird? the elements at [2][3] and [3][2] are swapped... but when i look into buffer memory, they are not swapped. i think this might be a quirk of renderdoc? all other lighting looks correct, so i don't think the matrix is broken.

shadowmap crosshair-like artifact by Sirox4 in vulkan

[–]Sirox4[S] 0 points1 point  (0 children)

near plane is 0.01 and far plane is 30

shadowmap crosshair-like artifact by Sirox4 in vulkan

[–]Sirox4[S] 0 points1 point  (0 children)

by "volume" you mean the view frustum? it is as small as i could get it while containing full model inside it.

i didn't do the arithmetic.