Comments (3)
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.
Please try with 4.2.2 to confirm this still occurs on a supported version
from godot.
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)
- Geometry gets strongly visually modified (simplified) when Camera3D's x frustum_offset is decreased below a certain negative number
- AStarGrid2D allow_partial_path does not always find the shortest path HOT 2
- `RenderingDevice.buffer_get_data` has very high latency HOT 2
- When inheriting `EditorSceneFormatImporter`, cannot call the parent class' virtual function "_import_scene()" because it hasn't been defined HOT 4
- Root Motion Track setting from script from instantiated scene HOT 6
- Custom SVG icon appears too large in Quick Open (Ctrl+P)
- Due to malformed Mach-o file, cannot run Godot app on Apple Silicon Mac HOT 2
- Normal values gets changed even when using `skip_vertex_transform` render_mode HOT 5
- Callable argument conversion error: Cannot convert argument 1 from int to int. HOT 2
- Signal tooltip doesn't go away when moving mouse to another signal in single window mode HOT 4
- RichTextLabel's "fade" offsets from start of string rather than start of command
- libc++abi: mutex lock failed editor crash HOT 1
- [Core] `Array` and `Dictionary` read only behavior is unsafe HOT 10
- JavaScriptObject example code doesn't work
- Adding a translation CSV results in errors on initial import for many types of resources HOT 5
- Meshes with a negative scale have incorrect normals when using `cull_disabled` and `cull_front` render modes HOT 1
- Landscape and Reverse Landscape orientation in iOS are in opposite direction that they are in Android
- 2D Camera viewport rounding error with subpixel position of 0.5 with "Snap 2D Transforms to Pixel" enabled HOT 7
- [Regression] Script classes instantiated manually in a variable can't call their own instance functions anymore HOT 2
- Issue with global_position while tween and pivot offset is set with certain values HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godot.