Jump to content

rd-rend2 (old thread)


eezstreet

Recommended Posts

Posted

Works now. :)

 

It seems now though, I get weird black bits on any ghoul2 model that has "rgbGen lightingdiffuseEntity" in the .shader or .mtr. Models that don't use a shader have no issues.

Posted

4ky9le.jpg

 

Also, the model's face mesh disappears randomly. Not sure if these two issues are connected, or whether it's just faces or random parts of the model:

 

11wc3e8.jpg

Posted

@@DT85 Can't reproduce the issue. I've created a shader to add rgbgen lightingDiffuseEntity to all of Kyle's textures and it works fine for me. Do you have the old rend2 GLSL shaders in a pk3 somewhere perhaps? I've changed them a fair bit which could cause strange things to happen if they've not been updated.

Posted

Maybe it's my card or something that rend2 doesn't like. :P

 

Anyways, I've been trying out cubemaps and I get this error when r_cubemapping is enabled. From first glance, it seems like it doesn't like platform toolset 120:

 var_PrimaryLightDir.xyz;
	// enable when point lights are supported as primary lights
	//sqrLightDist = dot(L2, L2);
	//L2 /= sqrt(sqrLightDist);
	NL2 = clamp(dot(N, L2), 0.0, 1.0);
	H2 = normalize(L2 + E);
	EH2 = clamp(dot(E, H2), 0.0, 1.0);
	NH2 = clamp(dot(N, H2), 0.0, 1.0);
	reflectance  = diffuse.rgb;
	reflectance += CalcSpecular(specular.rgb, NH2, NL2, NE, EH2, gloss, shininess);
	lightColor = u_PrimaryLightColor * var_Color.rgb;
	// enable when point lights are supported as primary lights
	//lightColor *= CalcLightAttenuation(float(u_PrimaryLightDir.w > 0.0), u_PrimaryLightDir.w / sqrLightDist);
    #if defined(USE_SHADOWMAP)
	lightColor *= shadowValue;
    #endif
	// enable when point lights are supported as primary lights
	//lightColor *= CalcLightAttenuation(float(u_PrimaryLightDir.w > 0.0), u_PrimaryLightDir.w / sqrLightDist);
	gl_FragColor.rgb += lightColor * reflectance * NL2;
  #endif
#else
	lightColor = var_Color.rgb;
  #if defined(USE_LIGHTMAP) 
	lightColor *= lightmapColor.rgb;
  #endif
   
gl_FragColor.rgb = diffuse.rgb * lightColor;
#endif
	
	gl_FragColor.a = diffuse.a * var_Color.a;
#if defined(USE_GLOW_BUFFER)
	out_Glow = gl_FragColor;
#else
	out_Glow = vec4(0.0);
#endif
}

compile log:
0(345) : error C7533: global function textureCubeLod is deprecated after version 120

recursive error after: Couldn't compile shader

Posted

Hm maybe I need to add a normal map. That would make sense.

 

EDIT: With parallax mapping too? Can you send me the textures/shaders? Would save me having to guess what to put on the textures and stuff :)

 

And I'll fix that shader compile error tomorrow evening or during the weekend. Should be a simple fix.

Posted

It happens on models that do not have normal maps or even shaders. Good example is the jedi model (not jaden). I've removed ALL of my mods and i'm just running openJK with base assets. It could be an issue that was brought about at the same time as mesh holes, which is when you changed the normal map code for ghoul2. As AhsuraDX said, this & mesh holes happen randomly and not everytime.

Posted

Exactly , and the "mesh holes" occured on models without rend2 shaders for me - I did not notice them on the AT-ST or any of the sabers I outfitted with rend2 shaders - but I may have overlooked them because of their small size on screen

Posted

@@DT85 @@AshuraDX are you using Nvidia graphics cards? There can be differences between the way different vendors handle strange numbers which could be why I'm not seeing them. I'm using an AMD graphics card.

Posted

@@DT85 @@AshuraDX are you using Nvidia graphics cards? There can be differences between the way different vendors handle strange numbers which could be why I'm not seeing them. I'm using an AMD graphics card.

yep, I am (GTX 460)

Posted

GTX 640. Sounds like an NVIDIA card compatibility issue with rend2 which is good (meaning the code isn't borked), but also bad (you'll probably need to do extra coding that's NVIDIA specific).

Posted

I run a video card that I read on the forums, 3.0, that can run Rend2. Intel card, but I cannot run Rend2. In the event I am not ignorant and or stupid, then I may of provided quality information! I hope I did!

Posted

3.0 is a number not a video card :P I'm guessing it's the version of OpenGL your video card supports, which isn't high enough to run rend2.

Posted

Xycaleth, I...Googled that and somehow I found a "3.0 Video-Card." I wonder if that makes me less, or more....

---Anywhose buying a new card. What are the best specs for your wonderful baby? My beautiful graphics....Oh Yes. 

 

 

 

./Me Signs away soul. You have a slave sir. Task me to something.

Posted

 

Maybe it's my card or something that rend2 doesn't like. :P

 

Anyways, I've been trying out cubemaps and I get this error when r_cubemapping is enabled. From first glance, it seems like it doesn't like platform toolset 120:

- snip -
compile log:
0(345) : error C7533: global function textureCubeLod is deprecated after version 120

recursive error after: Couldn't compile shader

Fixed in my latest commit :)

Posted

@@Xycaleth, when you implement dlights that project shadows & reflection (as in mirror-like reflection), I'll make a rend2 conversion of an existing map. Right now, I've been toying with FFA1 but it doesn't look as good as I'd like.

Posted

@@Xycaleth, when you implement dlights that project shadows & reflection (as in mirror-like reflection), I'll make a rend2 conversion of an existing map. Right now, I've been toying with FFA1 but it doesn't look as good as I'd like.

What do you mean by dlights that can project/do reflections? Reflections are a property of the materials, not the light O.o

Guest
This topic is now closed to further replies.
×
×
  • Create New...