Jump to content

FEATURE: OpenGL 3 Renderer


Recommended Posts

Posted

Every time I check this thread I feel like I'm visiting the Kennedy Space Center: you like everything you see, but you have no clue on what's going on or what people are talking about.

Posted

Pics for @Archangel35757 : https://jkhub.org/albums/hVA4D

 

Code for @@DT85:

#if defined(USE_LIGHT) && !defined(USE_FAST_LIGHT)
	//possible things to show: var_Tangent.xyz, var_Bitangent.xyz, var_Normal.xyz, N
	out_Color.rgb = var_Tangent.xyz * 0.5 + vec3(0.5);
#endif

Just place it at the end of the main function of the fragment code.

 

Soooo, that means, tangent code is completely off for glm models. Now I need to find out where the problem is ?_?

Tempust85 and minilogoguy18 like this
Posted

I kind of found a solution. It's ugly coding tough.

 

https://jkhub.org/albums/0UTbu

 

Maybe someone can find a real coding solution for it. I added some vector zeroing in tr_ghoul2. I'm not sure why this is needed, code doesn't look like its nessesarry. Now the code doesn't average the tangents of a surface anymore, but takes the tangent from a single triangle thats part of the surface.

 

Edit:

@@AshuraDX :rolleyes:

 

 

 

Edit2:

Code change: It averages the tangents again, but still have to clear them before.

Posted

If you look closely, the normals still don't match (in the upper image). It's especially noticeable just above the upper leg guard. On the bottom image, they differ along the bottom edge of the belt. Is this outputting the normal map? Or the vertex normals?

Posted

If you look closely, the normals still don't match (in the upper image). It's especially noticeable just above the upper leg guard. On the bottom image, they differ along the bottom edge of the belt. Is this outputting the normal map? Or the vertex normals?

Yea, I know. I hoped nobody will notice it, since I fixed it already and didn't want to make new screenshots. I found a valid fix though. The tangent and bitangent buffers just need to be zeroed at initialization. That's it. Damn, this took a while...

Posted

Good stuff guys.

 

Looks like tangents for the older models are fucked (funky shading definitely visible), might be worth taking the attitude of: older models load, and work, but look bad... start working in fbx from now on guyzzzz. or something along those lines.

 

Also, there's something fucky going on with the fresnel term on the spheres in the background, it's all kinds of weird. Let me know if you want me to take a look at the shader code.

 

Question: how are you handling the importance sampling? in realtime? or using the split-sum equation Epic posted up in 2014?

SomaZ and minilogoguy18 like this
Posted

The IBL in rend2 is pretty poor. The different mipmaps of the cube maps are just downscaled versions of the original. There's no importance sampling being done.

Posted

Updated the DF2 build folder so whoever wants, can have a play with PBR or even just normal maps. GL2 is now the default renderer, but just incase it's not - "cl_renderer rdsp-GL2; vid_restart" in the console.

 

I suppose I better get moving on an updated menu that includes GL2 cvars. :)

Posted

Grab the latest exe and dlls from the DF2 build folder - I've removed the need to use a shortcut or load the mod from the mod menu in-game. Alot of GL2 cvars are now set to enabled by default. This includes cubemapping & PBR, and I've also changed the default gloss type to be roughness instead of smoothness.

Archangel35757 likes this
Posted

If you intend to use GL2 as your main Renderer, you will have to redo all of your Materials for everything. You also will have to think about replacing all base JKA models with models made to support PBR. Updating base JKA models with proper normal maps will be just as much work as making new models.

Keep this in mind when making that decision.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...