Defold 1.3.5 BETA

Beautiful!

2 Likes

Doesn’t want to work on my android (and not only that, I’ve already checked). :frowning:
This is where it swears that there is no such texture in the render-target:
image

Log:

--------- beginning of main
: INFO:DLIB: Log server started on port 46761
: INFO:ENGINE: Target listening with name: samsung-SM-N970F - 192.168.100.4 - Android
: INFO:ENGINE: Engine service started on port 8001
: INFO:GRAPHICS: Initialised graphics device 'opengl'
: INFO:ENGINE: Defold Engine 1.3.5 (124598c)
: INFO:DLIB: MAWE: Create global Remotery instance!
: INFO:DLIB: Initialized Remotery (ws://127.0.0.1:17815/rmt)
: INFO:ENGINE: Loading data from: dmanif:game.dmanifest
: INFO:ENGINE: Initialised sound device 'default'
: WARNING:INPUT: No gamepad map found for gamepad 0 (Virtual). The raw gamepad map will be used.
: DEBUG:SCRIPT: render.FORMAT_R32F	28
: DEBUG:SCRIPT: render.FORMAT_R16F	26
: DEBUG:SCRIPT: render.FORMAT_RG16F	27
: DEBUG:SCRIPT: render.FORMAT_RG32F	29
: DEBUG:SCRIPT: render.FORMAT_RGBA16F	24
: DEBUG:SCRIPT: render.FORMAT_RGBA32F	25
: DEBUG:SCRIPT: SCREEN_WIDTH = 2190
: DEBUG:SCRIPT: SCREEN_HEIGHT = 1080
: DEBUG:SCRIPT: WINDOW_WIDTH = 1280
: DEBUG:SCRIPT: WINDOW_HEIGHT = 720
: ERROR:SCRIPT: render/custom.render_script:230: Render target does not have a texture for the specified buffer type.
: stack traceback:
:   [C]:-1: in function enable_texture
:   render/custom.render_script:230: in function <render/custom.render_script:167>
: 
: INFO:DLIB: SSDP: Started on address 192.168.100.4

This is my project to test the MRT:
__MRT_TEST.zip (5.3 MB)

6 Likes

Thanks. @jhonny.goransson will take a look!

1 Like

Hm, I did get it to “kinda” work on android by not using any floating point textures in the MRT since that seems to cause invalid operations when drawing (you can see on the screenshot that the depth values are clamped). I think that we expect drawing to a floating point render target works since we get back an ES3 context from the device, but it doesn’t seem to be a guarantee that the driver will support it anyway :frowning:

I don’t know exactly how we should solve it since it’s on driver level, the best thing we potentially could do is to try to render something to a render target on startup and see if we get errors or not, as far as I know there’s no way to query the context for this specific support. But I’ll keep testing a bit more, maybe there’s something I’m missing.

10 Likes

That’s not bad, thanks for the research!
Float render-targets are nice, but not necessary if you have MRT.
The main thing is that with MRT I can keep optimal data for cluster lighting in one pass of geometry (you know I like a lot of geometry).

As we’ve already found out by experience, for shadows we can get by with float number packing in 4 bytes of RGBA. The main thing is that it works, and it works reliably.

Of course, it’s a shame that without a float render-target there will be problems with saving data for HDR post-processing. But I think this can be defeated somehow, e.g. by passing the light power in the alpha channel.

2 Likes

Although the technical details escape me, this looks great! I’ve noticed differences in shadow mapping on Android too, from this post.

Would it be possible to apply the technique above to the example I posted somehow?

You can apply anything to it, the question is for what purpose?
I looked at your example and didn’t see any problems with the shadows.

What’s the problem you are facing? Is it the shadows are reverted thing you mentioned?

Sorry, no problem really, I assumed that the continued work might have been more efficient or otherwise better in some way! :slight_smile:

The differences I’m seeing on Android vs Max or iOS is that the clipping happens closer to origo on Android. I’d be a fan of using a system that works the same on iOS and Android.

1 Like

We have now solved the profiler issues that prevented some users from running their games on Windows. The beta period will be extended over the weekend and 1.3.5 will be released on Monday.

Please take this time to help us test the latest beta. Your feedback is extremely valuable to us!

6 Likes

If you have disparities between mobile platforms and desktop for graphical effects like that, it’s highly likely that your shaders need higher precision. You can try to use highp instead of medium/lowp for stuff like uvs, normals and positions.

2 Likes

Seems, if the project has Spine dependency early than 2.2.0 then before switch to beta 1.3.5 we need to update this dependency. Otherwise the editor do not open the project with error:

2022-08-11 15:21:52.016 18664 [clojure-agent-send-off-pool-0] INFO  editor.workspace - {:line 276, :msg "Loading plugin defold-spine/editor/src/spineext.clj"}
2022-08-11 15:21:52.168 18816 [clojure-agent-send-off-pool-0] ERROR editor.dialogs - {:line 434}
clojure.lang.Compiler$CompilerException: Syntax error compiling at (NO_SOURCE_FILE:81:33).
	at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3707)
	at clojure.lang.Compiler$DefExpr.eval(Compiler.java:457)
	at clojure.lang.Compiler.eval(Compiler.java:7181)
	at clojure.lang.Compiler.load(Compiler.java:7635)
	at clojure.lang.Compiler.load(Compiler.java:7582)
	at clojure.core$load_reader.invokeStatic(core.clj:4087)
	at clojure.core$load_string.invokeStatic(core.clj:4089)
	at editor.workspace$load_plugin_BANG_.invokeStatic(workspace.clj:277)
	at editor.workspace$load_editor_plugins_BANG_$fn__12304.invoke(workspace.clj:287)
	at clojure.core$map$fn__5851.invoke(core.clj:2753)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:51)
	at clojure.lang.RT.seq(RT.java:531)
	at clojure.core$seq__5387.invokeStatic(core.clj:137)
	at clojure.core$dorun.invokeStatic(core.clj:3133)
	at editor.workspace$load_editor_plugins_BANG_.invokeStatic(workspace.clj:283)
	at editor.workspace$resource_sync_BANG_$fn__12390.invoke(workspace.clj:462)
	at editor.workspace$resource_sync_BANG_.invokeStatic(workspace.clj:458)
	at editor.workspace$resource_sync_BANG_.invoke(workspace.clj:390)
	at editor.workspace$resource_sync_BANG_.invokeStatic(workspace.clj:399)
	at editor.defold_project$open_project_BANG_.invokeStatic(defold_project.clj:881)
	at editor.boot_open_project$open_project.invokeStatic(boot_open_project.clj:405)
	at editor.boot_open_project$open_project.invoke(boot_open_project.clj:403)
	at clojure.lang.AFn.applyToHelper(AFn.java:171)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:665)
	at editor.boot$open_project_with_progress_dialog$fn__90001.invoke(boot.clj:58)
	at editor.dialogs$make_load_project_dialog$fn__26686$fn__26689.invoke(dialogs.clj:432)
	at clojure.core$binding_conveyor_fn$fn__5739.invoke(core.clj:2030)
	at clojure.lang.AFn.call(AFn.java:18)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.ExceptionInInitializerError: null
	at com.dynamo.spine.proto.Spine$SpineModelDesc$BlendMode.<clinit>(Spine.java:473)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:398)
	at editor.workspace$load_class_BANG_.invokeStatic(workspace.clj:332)
	at editor.workspace$load_class_BANG_.invoke(workspace.clj:331)
	at clojure.lang.AFn.applyToHelper(AFn.java:154)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3702)
	... 33 common frames omitted
Caused by: java.lang.RuntimeException: Generated message class "com.dynamo.spine.proto.Spine$SpineSceneDesc" missing method "getSpineJsonBytes".
	at com.google.protobuf.GeneratedMessage.getMethodOrDie(GeneratedMessage.java:1973)
	at com.google.protobuf.GeneratedMessage.access$1100(GeneratedMessage.java:61)
	at com.google.protobuf.GeneratedMessage$FieldAccessorTable$SingularStringFieldAccessor.<init>(GeneratedMessage.java:2864)
	at com.google.protobuf.GeneratedMessage$FieldAccessorTable.ensureFieldAccessorsInitialized(GeneratedMessage.java:2110)
	at com.google.protobuf.GeneratedMessage$FieldAccessorTable.<init>(GeneratedMessage.java:2041)
	at com.dynamo.spine.proto.Spine$1.assignDescriptors(Spine.java:2750)
	at com.google.protobuf.Descriptors$FileDescriptor.internalBuildGeneratedFileFrom(Descriptors.java:392)
	at com.dynamo.spine.proto.Spine.<clinit>(Spine.java:2806)
	... 41 common frames omitted
Caused by: java.lang.NoSuchMethodException: com.dynamo.spine.proto.Spine$SpineSceneDesc.getSpineJsonBytes()
	at java.base/java.lang.Class.getMethod(Class.java:2108)
	at com.google.protobuf.GeneratedMessage.getMethodOrDie(GeneratedMessage.java:1970)
	... 48 common frames omitted
2022-08-11 15:21:52.176 18824 [JavaFX Application Thread] ERROR editor.error-reporting - {:line 112}
clojure.lang.Compiler$CompilerException: Syntax error compiling at (NO_SOURCE_FILE:81:33).
	at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3707)
	at clojure.lang.Compiler$DefExpr.eval(Compiler.java:457)
	at clojure.lang.Compiler.eval(Compiler.java:7181)
	at clojure.lang.Compiler.load(Compiler.java:7635)
	at clojure.lang.Compiler.load(Compiler.java:7582)
	at clojure.core$load_reader.invokeStatic(core.clj:4087)
	at clojure.core$load_string.invokeStatic(core.clj:4089)
	at editor.workspace$load_plugin_BANG_.invokeStatic(workspace.clj:277)
	at editor.workspace$load_editor_plugins_BANG_$fn__12304.invoke(workspace.clj:287)
	at clojure.core$map$fn__5851.invoke(core.clj:2753)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:51)
	at clojure.lang.RT.seq(RT.java:531)
	at clojure.core$seq__5387.invokeStatic(core.clj:137)
	at clojure.core$dorun.invokeStatic(core.clj:3133)
	at editor.workspace$load_editor_plugins_BANG_.invokeStatic(workspace.clj:283)
	at editor.workspace$resource_sync_BANG_$fn__12390.invoke(workspace.clj:462)
	at editor.workspace$resource_sync_BANG_.invokeStatic(workspace.clj:458)
	at editor.workspace$resource_sync_BANG_.invoke(workspace.clj:390)
	at editor.workspace$resource_sync_BANG_.invokeStatic(workspace.clj:399)
	at editor.defold_project$open_project_BANG_.invokeStatic(defold_project.clj:881)
	at editor.boot_open_project$open_project.invokeStatic(boot_open_project.clj:405)
	at editor.boot_open_project$open_project.invoke(boot_open_project.clj:403)
	at clojure.lang.AFn.applyToHelper(AFn.java:171)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:665)
	at editor.boot$open_project_with_progress_dialog$fn__90001.invoke(boot.clj:58)
	at editor.dialogs$make_load_project_dialog$fn__26686$fn__26689.invoke(dialogs.clj:432)
	at clojure.core$binding_conveyor_fn$fn__5739.invoke(core.clj:2030)
	at clojure.lang.AFn.call(AFn.java:18)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.ExceptionInInitializerError: null
	at com.dynamo.spine.proto.Spine$SpineModelDesc$BlendMode.<clinit>(Spine.java:473)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:398)
	at editor.workspace$load_class_BANG_.invokeStatic(workspace.clj:332)
	at editor.workspace$load_class_BANG_.invoke(workspace.clj:331)
	at clojure.lang.AFn.applyToHelper(AFn.java:154)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3702)
	... 33 common frames omitted
Caused by: java.lang.RuntimeException: Generated message class "com.dynamo.spine.proto.Spine$SpineSceneDesc" missing method "getSpineJsonBytes".
	at com.google.protobuf.GeneratedMessage.getMethodOrDie(GeneratedMessage.java:1973)
	at com.google.protobuf.GeneratedMessage.access$1100(GeneratedMessage.java:61)
	at com.google.protobuf.GeneratedMessage$FieldAccessorTable$SingularStringFieldAccessor.<init>(GeneratedMessage.java:2864)
	at com.google.protobuf.GeneratedMessage$FieldAccessorTable.ensureFieldAccessorsInitialized(GeneratedMessage.java:2110)
	at com.google.protobuf.GeneratedMessage$FieldAccessorTable.<init>(GeneratedMessage.java:2041)
	at com.dynamo.spine.proto.Spine$1.assignDescriptors(Spine.java:2750)
	at com.google.protobuf.Descriptors$FileDescriptor.internalBuildGeneratedFileFrom(Descriptors.java:392)
	at com.dynamo.spine.proto.Spine.<clinit>(Spine.java:2806)
	... 41 common frames omitted
Caused by: java.lang.NoSuchMethodException: com.dynamo.spine.proto.Spine$SpineSceneDesc.getSpineJsonBytes()
	at java.base/java.lang.Class.getMethod(Class.java:2108)
	at com.google.protobuf.GeneratedMessage.getMethodOrDie(GeneratedMessage.java:1970)
	... 48 common frames omitted

As I see, the profiler works correct now on Windows PC, my project is getting about 8% CPU and MS Defender isn’t starting when project is open. Good job, thanks!

Only one thing:
Is it possible to pull up “Draw call” value from the bottom of profiler screens to top part?. Now i have to stretch the game window to second monitor to see it:

6 Likes

Yes, this would be super. I can’t see them on my Mac either, even when going fullscreen.

3 Likes

Please create a ticket on GitHub and we’ll see what we can do for the next release after this beta.

I’m not sure about any of this. @AGulev and @mats.gisselson ?

1 Like

yes, 1.3.5 works only with 2.2.0 and higher

3 Likes

This seems to indeed have solved the clipping issues on Android (without reducing performance)! Thanks so much for mentioning this, it was something I hadn’t considered.

1 Like

Did you change something in the shader compilation?
This example has stopped working for me.
It’s writing errors:

: ERROR:GRAPHICS: 0:2: P0003: Warning: Extension 'GL_OES_standard_derivatives' not supported
: 0:7: S0060: Multiple output variables defined. Location must be specified for all outputs.
: 
: WARNING:RESOURCE: Unable to create resource: /assets/models/shaders/object.fpc: FORMAT_ERROR
: WARNING:RESOURCE: Unable to create resource: /assets/models/shaders/object.materialc: FORMAT_ERROR

Hm, is this webgl? Could you give me a bit more context regarding the error, or a repro case? We have only done changes to webgl that is related to extensions, but it shouldn’t be breaking.

No, it’s about the mobile.
On PC, everything works as before.
However, if before I managed to run the example on mobile (when version 1.3.5 was in beta), now this example already gives an error and crashes.
__MRT_TEST.zip (5.3 MB)

Thanks, I’ll take a look tomorrow!