Giter Club home page Giter Club logo

Comments (3)

AwesomeAxolotl avatar AwesomeAxolotl commented on August 15, 2024 2

After thinking the code through a bit, I found the the reason this happens (roughly):
On the change the old texture loses its last reference (RefCounted), and some internal of Light3D still using this will run into a missing reference because the reference already got cleaned up

So the fix would be keeping the current texture in memory by holding it in a var before changing light_projector to a new value or in this example it would also work to (pre)load the textures into the image1 and image2 vars (or an array) like

var image1 = preload("res://bobr.png") var image2 = preload("res://hegodh.png")

var new_image : CompressedTexture2D = image1

from godot.

AThousandShips avatar AThousandShips commented on August 15, 2024

Please try with 4.2.2 to confirm this still occurs on a supported version

from godot.

homhomhomhomhom avatar homhomhomhomhom commented on August 15, 2024

Issue is also there on 4.2.2

AwesomeAxolotl's fix works tho, altho I'm still not sure it should give the error in the original example

from godot.

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.