Jump to content

FEATURE: OpenGL 3 Renderer


Recommended Posts

Posted

Because it's a simple dlight. They are simple point emitters. They don't know anything else besides that they exist and that they emit light. The light fixture is non existent in the great mind of the dlight. :P We will do something about this, but first I need a proper tool to build lights. Because of that, the Blender stuff.

Posted

I thought you guys were developing an in-game light editor?

Yea, that was the plan. I will make a light editor in Blender though, simply because it also give me good references to tweak the renderer to look correctly.

  • 3 weeks later...
Posted

Well, I got a new patch from ioq3 working in our GL2 renderer. I needed to change few more things to make it work, but it does now.

 

 

4IbxsaL.jpg

 

 

 

This enables cg_shadows 3 to work again. I know this is not really what we want, but:

tumblr_lgedv2Vtt21qf4x93o1_40020110725-2

 

Added to this. I've fixed misc_model_static's to cast a projection shadow with the Z component of the shadow correctly planted on the floor (was in the middle of the model). Can't do it for misc_model_ghoul though (shadow Z component is screwed), so to get shadows for them we'll have to wait until pshadows work.

SomaZ likes this
Posted

Speaking of pshadows, ioq3 has theirs working well. I've got a branch for porting it, but nothing shows up still and I think it has to do with the different sorting. @Xycaleth, you busy bro? :D

Posted

Speaking of pshadows, ioq3 has theirs working well. I've got a branch for porting it, but nothing shows up still and I think it has to do with the different sorting. @Xycaleth, you busy bro? :D

Problem is that they are slow af. Need a better way of getting their depth buffer first. Tried to Port them too, was in the Last commit.
Posted

Added to this. I've fixed misc_model_static's to cast a projection shadow with the Z component of the shadow correctly planted on the floor (was in the middle of the model).

Why did you remove the shadowplane FX check in tr_mesh though? Pls keep this clean, you added it in cgame, then use it. :)
Posted

I did that because I couldn't find where to add shadowplane to md3 items, misc models, etc. So this just disables that check.

 

 

EDIT:

 

Tried everywhere possible to add RF_SHADOW_PLANE (drawmiscents, createmiscentfromgent, misc_model_static), and no luck. :\

Posted

I guess I'll remove the cg_shadows 4 support for misc_model_statics though. It's very limited. Only 16 shadows at once. You could try starting up yavin2 and see the mess its creating.

Posted

on my test map, shadows 4 (md3 and glm) are sometimes on the ceiling as well as where they should be projected. Still get that pass error too when jumping at the light source, possibly the ghoul2 code being screwy?

Posted

Yea, that's because it's not completely implemented. It's kind of a prototype from SmileTheory and he is not really into extending it. Never experienced problems with Pass space though with it. Is it on the testmap I got from you?

Posted

I'll have to upload a new copy to Dropbox later for you. All I did though was place 1 light (rest are dlights) and then jumped around where I put it.

  • 2 months later...
Posted

So, long time no update here.

I started reworking shader definitions because I hate the stage fuckery with normal maps and specular maps.

 

The different normal and specular stages were removed completely. (though I might add the vanilla spec stage back in, noticed that I killed that one too today :/ )

 

planned new stage keywords are:

- normalMap (done)

- normalHeightMap (done)

- specularMap

- specularGlossMap

- albedoMap

- rmoMap

- diffuseMap (simply as alternative to map, nothing special about this)

 

So, the thing is, that I will also write support for the other pbr workflow (specular gloss) simply because I will handle every pbr material internally in this format. This has a simple reason, I can simply write a prepass that is needed for screen space reflections (the only informations needed for ssr are position, normal, previously rendered image and the specular with gloss/roughness). I will also port this stuff to rend2 so everybody can use their stuff in mp and sp without reworking every piece they created.

 

@@DT85 When I finished this, you need to update the mtr shader thread. ;)

 

Edit: Oh, and sorry that we need to rework the shader files, but this shit was long overdue.

 

Edit2: Damn, need to focus more... Any thoughts and/or wishes, maybe other wording for the keywords?

  • 4 weeks later...
Posted

So,

 

I finished this today. We can now use both workflows. :)

New stage keywords are:

-normalMap

-normalHeightMap

-specularMap or specMap, both work the same

-rmoMap

 

Shaders look like this now:

textures/testmap/testmap_wall_d
{
    {
        map textures/testmap/Bricks1
        rmoMap textures/testmap/Bricks1_rmo
        normalHeightMap textures/testmap/Bricks1_nh
    }
    {
        map $lightmap
        blendfunc GL_DST_COLOR GL_ZERO
    }
}

Autoloading of _rmo maps was removed for now, autoloading of _spec maps added.

Specular maps are rgb specular a gloss, rmo is unchanged.

  • 2 weeks later...
Posted

Any ideas how to tackle glass? I can't seem to get a transparent png or tga with alpha to actually work ingame. The usual shader code for them doesn't look to work anymore, or there's something else I need to add?

Posted

Hm, glass is not really supported right now. It should work for now with the standard shader settings though. Problem right now is that reflections are blended out with the value of the transparency of the material itself, which is bad. It's something I want to tackle next, but I have no idea when I have some time for it. Can you post the shader and a picture of the glass ingame?

Posted

Ok so transparency seems to work, but I can't seem to have cubemaps working as well. Also found out that for cubemaps to work in a shader, the shader must have a lightmap stage.

 

 

EDIT:

 

Got something working, but need to tweak it. I'll post back when i'm done.

 

 

EDIT 2:

 

Nope, looks like shit. :D

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...