Coder Social home page Coder Social logo

Comments (4)

Baker7 avatar Baker7 commented on August 11, 2024 1

Solution:

gl_rmain.c , R_UpdateVariables

if (r_refdef.scene.worldmodel)
{
	r_refdef.scene.lightmapintensity *= r_refdef.scene.worldmodel->lightmapscale;
	// Baker: Add this ...
	if (cl.worldmodel && cl.worldmodel->type == mod_brushq3) {
		r_refdef.scene.lightmapintensity *= r_refdef.scene.rtlightstylevalue[0];
	}
}

q31

q32

q33

from darkplaces.

Baker7 avatar Baker7 commented on August 11, 2024

Hemebond, can you provide the last known working version of DarkPlaces that did not have the issue.

I assume Wrath doesn't have issue? Is this correct?

If you can tell me the most recent one where it worked, I would like to take a look at this.

from darkplaces.

hemebond avatar hemebond commented on August 11, 2024

Hemebond, can you provide the last known working version of DarkPlaces that did not have the issue.

I tried to compile older versions to find and test the exact commit but couldn't compile (I need to try with 5e9e998). It appears there were significant light style changes in fb21704.

I assume Wrath doesn't have issue? Is this correct?

Correct. Wrath is based on a much older version.

If you can tell me the most recent one where it worked, I would like to take a look at this.

The most recent "release" that works is 2017-08-30.

from darkplaces.

Baker7 avatar Baker7 commented on August 11, 2024

This is highly likely part of the solution:

Classic DarkPlaces does this in gl_rmain.c in R_GetCurrentTexture:

And DarkPlaces Beta has no equivalent code in R_GetCurrentTexture

		VectorSet(t->dlightcolor, t->lightmapcolor[0] * t->lightmapcolor[3], t->lightmapcolor[1] * t->lightmapcolor[3], t->lightmapcolor[2] * t->lightmapcolor[3]);
		colorscale = 2;
		// q3bsp has no lightmap updates, so the lightstylevalue that
		// would normally be baked into the lightmap must be
		// applied to the color
		// FIXME: r_glsl 1 rendering doesn't support overbright lightstyles with this (the default light style is not overbright)
		if (model->type == mod_brushq3)
			colorscale *= r_refdef.scene.rtlightstylevalue[0];
		colorscale *= r_refdef.lightmapintensity;
		VectorScale(t->lightmapcolor, r_refdef.scene.ambient, ambientcolor);
		VectorScale(t->lightmapcolor, colorscale, t->lightmapcolor);

from darkplaces.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.