I Added Native Post-Processing, Advanced Lighting & Physics3D Joints (Ragdoll) Directly into GDevelop's Source Code

Hey GDevelop community!

I’ve been working deep inside GDevelop’s source code and have successfully implemented several major systems natively into the engine — fully buildable, fully integrated, and accessible directly through the layer effects panel and the Jolt physics behavior. Everything is built in and works out of the box.

Here’s a full breakdown of what I added:


Post-Processing Effects (Native Layer Effects)

All effects are registered as native 3D layer effects — you just add them on your layer like any built-in effect. No workarounds needed.

Chromatic Aberration — Scene3D::ChromaticAberration

Splits the RGB channels radially from the screen center, simulating lens distortion. Strength increases toward the screen edges.
![Screenshot 2026-03-02 015649|690x371]

Parameters:

  • intensity (default: 0.005)
  • radialScale (default: 1.0)
  • enabled

Uses ShaderPass integrated with GDevelop’s shared texture capture pipeline (captureScene3DSharedTextures).


Color Grading — Scene3D::ColorGrading

Per-pixel screen-space color correction. Default values are tuned for a cold/horror cinematic look.

Parameters:

  • temperature (default: -0.3) — negative = cooler blue
  • tint (default: -0.1) — negative = green shift
  • saturation (default: 0.8)
  • contrast (default: 1.2)
  • brightness (default: 0.95)
  • enabled

Tone Mapping — Scene3D::ToneMapping

Applies HDR tone mapping directly on the renderer. Supports multiple industry-standard modes.

Parameters:

  • mode: ACESFilmic (default) | Reinhard | Cineon | Linear
  • exposure (default: 1.0)
  • enabled

When enabled, it sets renderer.toneMapping, renderer.toneMappingExposure, and switches output to SRGBColorSpace. Cleanly reverts when disabled.


Screen-Space Reflections — Scene3D::ScreenSpaceReflections

Registered in the post-processing pipeline as SSR. Uses depth + scene color to perform ray tracing in screen space, with up to 64 internal steps and a refinement pass for accuracy.

Parameters:

  • intensity (default: 0.75)
  • maxDistance (default: 420)
  • thickness (default: 4)
  • enabled

Step count adapts based on quality setting: low = 12, medium = 20, high = 28.


Depth of Field — Scene3D::DepthOfField

Registered as DOF. Reconstructs distance from the depth buffer and applies a Gaussian blur (7x7 kernel) based on distance from the focus plane. Blur strength is scaled by quality: dofBlurScale — 0.65 / 0.9 / 1.05.

Parameters:

  • focusDistance (default: 400)
  • focusRange (default: 250)
  • maxBlur (default: 6)
  • enabled

Volumetric Fog — Scene3D::VolumetricFog

Registered as FOG. Volumetric ray marching shader with transmittance calculation. Gathers lighting from PointLight and SpotLight sources (up to 16 lights) and computes per-light attenuation inside the volume.

Parameters:

  • fogColor
  • density (default: 0.012)
  • lightScatter (default: 1)
  • maxDistance (default: 1200)
  • enabled

Step count adapts based on quality: low = 18, medium = 30, high = 44.


SSAO — Scene3D::SSAO

Registered as SSAO. Reconstructs normals from the depth buffer and performs hemisphere sampling to calculate ambient occlusion. Maximum 32 samples, clamped by quality setting: low = 6, medium = 12, high = 20.

Parameters:

  • radius (default: 60)
  • intensity (default: 0.9)
  • bias (default: 0.6)
  • samples (default: 16)
  • enabled

Lighting Systems

Flickering Light Behavior — Scene3D::FlickeringLight

Introduced a Flickering Light behavior for dynamic light effects with fully configurable parameters. Attach it to any PointLight or SpotLight object to get realistic flickering with optional random failure states.

Parameters:

  • baseIntensity (default: 1.0)
  • flickerSpeed (default: 10.0)
  • flickerStrength (default: 0.4)
  • failChance — probability of a momentary blackout per second (default: 0.02)
  • offDuration — how long the light stays off during a failure event (default: 0.1s)
  • enabled

Uses a sine + noise signal blended together, writing intensity natively via updateDoubleParameter('intensity', ...).


Directional Light — Full CSM Shadow System

I heavily upgraded Scene3D::DirectionalLight with a Cascaded Shadow Map (CSM) system, alongside new shadow properties and stabilization features.

What’s new:

  • Enhanced lighting effects with new shadow properties and stabilization features — a targeted upgrade to GDevelop’s existing DirectionalLight system directly in the source code
  • 3 shadow cascades with practical split distribution via cascadeSplitLambda
  • Each cascade has its own shadow quality (near = high detail, far = soft)
  • Shadow stabilization — projection snaps to texel grid in light-space, eliminating shadow swimming as the camera moves
  • Two anchor modes:
    • shadowFollowCamera = true — shadows follow the camera (good for moving characters)
    • shadowFollowCamera = false — shadows anchored to a fixed world position (no movement artifacts)
  • Auto bias/normalBias tuning per cascade
  • Updated shadow map size to explicitly support 4096 for high-end GPUs — respects GPU limits and scales accordingly
  • New shadow properties added for enhanced control over cascaded shadow behavior

New parameters:

  • maxShadowDistance
  • cascadeSplitLambda
  • shadowMapSize
  • shadowFollowLead
  • shadowFollowCamera

Rim Light — Scene3D::RimLight

Added a native Rim Light effect — a classic technique used in cinematic and game rendering to outline characters/objects with a colored backlight, separating them from the background.

  • Fully native, registered as a 3D layer/object effect
  • Controllable color, intensity, and falloff
  • Works alongside existing lights without conflicts

SpotLight & PointLight — Origin Object + Target Support

Both SpotLight and PointLight now support:

  • Specifying which object they originate from — the light source position follows the object in the scene
  • A target object — the light direction is automatically aimed at the target every frame
  • Center/pivot point customization

This makes dynamic lighting setups (e.g., a flashlight following a character and pointing at an enemy) fully native and event-driven.


Light Bounce System — Physics-Aware Lighting

Added a light bounce/reflection system that interacts with physics objects in the scene. PointLight and SpotLight now detect physics-enabled objects within their range and calculate reflected light contribution based on surface normals and material properties. This means objects that move, collide, or fall dynamically affect how light bounces in the scene — no baked lighting required.


Physics3D — Jolt Engine Joints & Ragdoll (Native Behavior)

All of this is built natively inside the Jolt physics behavior. Accessible through events and actions — no extensions needed.

Joint Types Supported

  • Fixed, Point, Hinge, Slider, Distance, Cone, SwingTwist
  • PulleyJoint — newly added (Physics3D::PulleyJoint)

PulleyJoint — Physics3D::PulleyJoint

Simulates a rope-over-pulley system connecting two bodies.

Pulley A o----\
               \   Body A
                +--- total rope ---+
               /   Body B
Pulley B o----/

Rule: lengthA + ratio * lengthB = constant

Actions available:

  • AddPulleyJoint
  • SetPulleyJointLength

Expressions:

  • PulleyJointCurrentLength
  • PulleyJointTotalLength

Advanced Joint Controls

Every joint type supports:

  • Motors — drive rotation/translation
  • Limits — min/max angle or position
  • Springs — soft constraints
  • Friction — resistance
  • Solver overrides — priority, stability presets
  • Break thresholds — joints snap when force/torque exceeds limit
    • SetJointBreakThresholds / ClearJointBreakThresholds
  • Reaction monitoring:
    • JointReactionForce
    • JointReactionTorque

Ragdoll System — Native Inside Jolt Behavior

A complete ragdoll system built natively into the physics behavior, with a built-in GUI for setup.

Features:

  • Create ragdoll groups, add bodies, add joints, remove groups
  • Ready-made states: Active, Limp, Stiff, Frozen
  • Group-wide controls: damping, stiffness, friction, impulse, gravityScale
  • Query: body count, joint count per group
  • Collision filtering inside the ragdoll group

Humanoid Templates:

  • BuildHumanoidRagdoll — auto-builds a full humanoid skeleton
  • BuildHumanoidRagdollFromTag — builds from tagged objects in scene

Skeleton structure:

Head -> Chest -> Hips
              |-- UpperArmL -> LowerArmL
              |-- UpperArmR -> LowerArmR
              |-- ThighL -> ShinL
              |-- ThighR -> ShinR

Build & Integration Notes

  • Everything is implemented natively in the source code — fully buildable
  • 3D effects and behaviors registered in: Extensions/3D/JsExtension.js
  • Physics joints/ragdoll registered in: Extensions/Physics3DBehavior/JsExtension.js
  • Post-processing integrates with GDevelop’s existing PostProcessingStack on the layer
  • The ragdoll system includes a native GUI inside the behavior editor

Full List of All Available Layer Effects in This Build

Every effect currently available in the engine’s layer effect panel:

Effect Type Notes
Ambient light Lighting Built-in
Directional light Lighting Enhanced — CSM + stabilization + new shadow properties
Hemisphere light Lighting Built-in
Point light Lighting Enhanced — origin object + target support + light bounce
Spot light Lighting Enhanced — origin object + target support + light bounce
Rim Light Lighting Added — native cinematic rim lighting
Fog (exponential) Atmosphere Built-in
Fog (linear) Atmosphere Built-in
Volumetric fog Atmosphere Added — ray marching + multi-light scattering
Bloom Post-Processing Built-in
Brightness and contrast Post-Processing Built-in
Depth of field Post-Processing Added — Gaussian blur with focus plane
Exposure Post-Processing Built-in
Hue and saturation Post-Processing Built-in
Screen-space reflections Post-Processing Added — ray marching in screen space
SSAO Post-Processing Added — hemisphere sampling ambient occlusion
Skybox Environment Built-in
Chromatic Aberration Post-Processing Added — native shader pass
Color Grading Post-Processing Added — full color correction pipeline
Tone Mapping Post-Processing Added — ACES / Reinhard / Cineon / Linear

Everything listed as “Added” or “Enhanced” was implemented directly in the source code and is fully buildable.


Happy to answer any questions or share more details about the implementation. This is all running natively in my build — no plugins, no external dependencies.
By Islam ibrahim






13 Likes

w…w…WHAT? HOW? IM SO PROUD OF YOU, I ALMOST CANT BELIEVE MY EYES. Im astonished and inspired, really. This might mean I won’t need to inject my own shaders in JavaScript just for a fraction of this functionality…

That’s great - so you’ve added all that to your own personal build? The rag doll physics sounds ace - but what happens as the base build updates and they start adding stuff that conflicts with your code? - i have no experience with source code development - or any code development - so i don’t know how this works

Thank you, my friend.
I tried to add things that will help all of us.
I want to talk to the team about the additions officially, but I don’t expect them to agree. Imagine with me that I am creating the biggest part of the roadmap.
I will try to make sure everything is correct and export a stable .exe version.

Most likely there will be no conflict.
The 3D effects inside the engine are an extension written in TypeScript and added to the interface via JavaScript.
I have injected the shaders and lighting in accordance with the system and similar to the rest of the shader and lighting system.
As for physics, I actually added it from Jolt, officially.
So I don’t know, I want to publish it, but I want to make sure everything is fine first.

1 Like


With the same principle of this structure, everything is interconnected

1 Like

Oh God, Sam… you’ve just climbed to the top of my chart of favorite users.

I’m very interested in the “skeleton” part

Native Post-Processing Shaders, Advanced Lighting & Physics3D Joints by Carrotstudio0 · Pull Request #8343 · 4ian/GDevelop
The Offical Pull Req in gdevelop Repo

2 Likes

Thank you, Yo you are actually one of my favorite characters, my friend.
As for the skeleton idea, I will try to think about it. I am really clumsy in animation haha.

1 Like

Fantastic - Looks like a lot of works gone into this and its all stuff that i’ve seen requested - so great job!

1 Like

I’ve closed your other thread, no duplicates, please.

1 Like

i use a mac lol, but i really dont mind. maybe these could make it into the full version

1 Like

Wanted to share some feedback from a first real test of the 5.6.260 experimental build.

VENJII — who somehow manages to be both a genius and deeply passionate about carrots — gave the build a proper run and the results were honestly better than expected.

He tested the full post-processing stack (SSAO, SSR, DOF, Volumetric Fog, Chromatic Aberration, Color Grading), the new CSM shadow system on DirectionalLight, and the upgraded PointLight/SpotLight with target support.

His experience across all three systems was excellent — effects stacked without conflicts, shadows held stable without swimming even during fast camera movement, and the lighting responded correctly to scene changes in real time.

3 Likes

@samibrahim

Click to read :

العربية

طلب السحب (Pull Request) الحالي يتضمن عددًا كبيرًا من التغييرات المختلفة، وكان من الأفضل تقسيمه إلى عدة طلبات سحب أصغر.

طلب سحب واحد ضخم يحتوي على هذا الكم من التعديلات فرص قبوله ضعيفة جدًا، لأنه يجعل عملية المراجعة الدقيقة صعبة للغاية.

كما يبدو أن طلب السحب تم إنشاؤه إلى حد كبير باستخدام الذكاء الاصطناعي، مما أدى إلى إضافة كمية كبيرة من الكود والملفات غير الضرورية.

قد يكون هذا النوع من طلبات السحب مفيدًا لأغراض التجربة أو النمذجة الأولية (prototyping)، لكن في وضعه الحالي التنفيذ غير منظم، والبنية العامة تحتاج إلى إعادة هيكلة كاملة بعد نقاش مطوّل حول معمارية الكود.


بالإضافة إلى ذلك، كانت هناك عدة ملاحظات بخصوص أسلوبك غير المعتاد في المساهمة، خاصة ما يتعلق بادعاء ملكية أعمال قام بها آخرون في الأصل.

المساهمات مرحّب بها ومقدّرة بالطبع. لكن دمج إضافات (Extensions) داخل المحرك باستخدام الذكاء الاصطناعي دون ذكر واضح وصريح للمؤلفين الأصليين ليس أمرًا مناسبًا.

كخطوة أولى، من المهم أن تذكر مصادر عملك بوضوح، وأن توضح من أين جاءت السكربتات الأصلية.


وأخيرًا، لا داعي لإنشاء ثلاثة مواضيع لمناقشة نفس المساهمة. هذا الأمر غير مستحسن ويؤدي إلى إغراق المنتدى بالمواضيع. نشر موضوع واحد يكفي.

English

The pull request currently includes many different changes that should ideally be split into several smaller pull requests.

A single large PR that introduces this many modifications has very little chance of being accepted, as it makes proper review very difficult.

It also appears that the PR was largely generated with AI, adding a significant amount of code and unnecessary files.

While this PR can be fun for prototyping, in its current state the implementation is not clean, and the overall architecture would need a total refinement after a long discussion on the code architecture.

Additionally, there have been several reports regarding your unusual approach to contributing, particularly concerns about taking ownership of work originally done by others.

Contributions are of course welcome and appreciated. However, integrating extensions into the engine using AI without clearly crediting the original authors is not appropriate.

As a first step, it would be important to clearly mention your sources and specify where the original scripts come from.

One last thing: there’s no need to create three topics to discuss the same contribution. It’s not well regarded, and it floods the forum. Posting once is enough.

2 Likes

How are you? I hope you are well.
I have actually organized the submission and split it into more than one PR, as 4ian mentioned to me in the comments, and it has been implemented.
As for the additions I made, they are from me with actual help from AI, and there is no actual author except me and what AI assisted me with.
And thank you very much for the advice

You added cascaded shadow maps??? Dude I’ve literally been asking for that that’s a game changer. I do hope it’s naturally implemented into the current gdevelop directional lighting though, I don’t want to relay on a third 3d light extension.

Yes, I added it. I didn’t expect it to be required haha. It’s good that we added it.

You can try the system now and give me all possible feedback.

To be fair I would but I’m currently developing a game and I wouldn’t want to corrupt anything by modifying the entire gdevelop app right now, I’d rather wait for it to get added in an update with all checks passed or something like that.

1 Like