Jump to content

rd-rend2 (old thread)


eezstreet

Recommended Posts

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

Link to comment

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

Link to comment

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.

Link to comment

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.

Link to comment

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.

Link to comment

 

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 :)

Archangel35757, Stoiss and DT. like this
Link to comment

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

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