Coder Social home page Coder Social logo

Comments (3)

Baker7 avatar Baker7 commented on August 11, 2024

This does fix it, although I'm not quite comfortable with it.

The rendering in DP master is quite different than Xonotic 0.8.6 / old DarkPlaces and so my comfort level of this is less because some of the rendering works differently.

What the problem is:

		// force lightmap upload on first time seeing the surface
		//
		// additionally this is used by the later code to see if a
		// lightmap is needed on this surface (rather than duplicating the
		// logic above)
		loadmodel->brushq1.lightmapupdateflags[surfacenum] = true;
		loadmodel->lit = true;

This is in Mod_Q1BSP_LoadFaces after we loaded the lighting. loadmodel->lit = true; <---- well, not necessarily

loadmodel->lit = loadmodel->brushq1.lightdata ? true : false; // Baker: Set lit depending on whether we have lightdata

Then what works ... these are mostly in cl_main.c and clvm_cmds.c and csprogs.c is hitting every r_fullbright.integer and adding a check for light data.

Before: if(!r_fullbright.integer)
After: 	if(!r_fullbright.integer /*0*/ && r_refdef.scene.worldmodel && r_refdef.scene.worldmodel->lit)
Before:	if (!(ent->flags & RENDER_LIGHT) || r_fullbright.integer)
After:	if (!(ent->flags & RENDER_LIGHT) || (r_fullbright.integer || !r_refdef.scene.worldmodel || !r_refdef.scene.worldmodel->lit) )

Is this the "right" way to do it? I can't say. The old codebase used R_LightPoint to do this check and set ambient/diffuse/etc to 1 if no lightdata.

from darkplaces.

hemebond avatar hemebond commented on August 11, 2024

Can you share the source for the map?

from darkplaces.

Baker7 avatar Baker7 commented on August 11, 2024

I lost it ages ago, but the map decompiles easy with any q1bsp tool. (I forgot to put .map source in it on release, I was so focused on the .qc source). The map was released as gpl 2.

The map source is nothing special. Several cube entities with teleporters if they rise.

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.