Git Product home page Git Product logo

Comments (9)

fabiolimamp avatar fabiolimamp commented on August 23, 2024

Can confirm the bug happening in the current 2.0.-alpha1 build. But I in my case I tried building the BSP with 0.18.2 qbsp and still got no sun.

Another thing is that the sun doesn't render either when set in worldspawn or via a light entity.

from ericw-tools.

radgeRayden avatar radgeRayden commented on August 23, 2024

Admittedly my testing wasn't extensive, so I probably made a mistake. @fabiolimamp can you confirm that qbsp is the only affected executable?

from ericw-tools.

fabiolimamp avatar fabiolimamp commented on August 23, 2024

Admittedly my testing wasn't extensive, so I probably made a mistake. @fabiolimamp can you confirm that qbsp is the only affected executable?

Nope, like I said, even running the BSP step with the 0.18.2 qbsp,exe got no sun for me.
All I had in terms of settings was a wadpath set and the bsp2 switch.

from ericw-tools.

dsvensson avatar dsvensson commented on August 23, 2024

Same here, going back to a5c0f0e brings the light back, haven't checked what commit closer to HEAD that still works. Oddly enough lightpreview is not affected. Fun thought would be if CI would generate a huge atlas and upload somewhere for before/after CI build for a set of variations.

from ericw-tools.

ericwa avatar ericwa commented on August 23, 2024

f93a36c is what introduced the breakage. I don't understand why because that commit was only supposed to change the handling of missing textures to match the old behaviour, but I'm compiling sun_test.map with all textures available so the handling of missing textures shouldn't be relevant..

from ericw-tools.

Paril avatar Paril commented on August 23, 2024

Are we removing texture names from dummy textures? They should still be retained...

from ericw-tools.

ericwa avatar ericwa commented on August 23, 2024

I must just be corrupting the dmiptex lump in that commit..

Are we removing texture names from dummy textures? They should still be retained...

I think we need to remove them for backwards compatibility; prior to f93a36c, maps with missing textures would crash winquake, and other engines. vkQuake + QS and others applied a patch to work around this, because some bsp's were released in a map pack with these 0x0 textures:

Novum/vkQuake#567

They also rendered wrong in Fitzquake/QS - missing textures are supposed to render with an orange checkerboard.

Also I think I broke -notex in f93a36c . -notex is documented as producing backwards-incompatible bsp's so I think that should be our control for writing 0x0 textures maybe? I'll need to double check what -notex did in the release version.

from ericw-tools.

ericwa avatar ericwa commented on August 23, 2024

I think I finally tracked down what's happening here.

The bug is suppressed if you have a .wad loaded containing a "skip" texture (and no other missing textures in the map.)

If you don't have that, the "skip" texture we always write in qbsp gets written as -1 and with no name.
Then in light, we register it at some point as a texture called "" (empty string).
Then this code in AddSun does a img::find("") which returns an actual texture (the "skip" placeholder), and accidentally activates the "filter sunlight to only emit from specific textures" codepath, which is what hides the sunlight:

sun.suntexture = suntexture;
sun.suntexture_value = img::find(suntexture);

from ericw-tools.

Paril avatar Paril commented on August 23, 2024

Oh this explains why we had crashes in the _project_texture pathways too; it was finding an empty image with no pixels, and then divided by zero...

from ericw-tools.

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.