dustyroom-studio / quibli-doc

Documentation of the Quibli asset.
https://quibli.dustyroom.com
2 stars 1 forks source link

ECS Incompatibility: 'Quibli/Stylized Lit' Shader SRP Batcher Error #28

Open ZingZhou opened 4 months ago

ZingZhou commented 4 months ago

Describe the bug The "Quibli/Stylized Lit" shader appears to be incompatible with Unity's ECS mode. When attempting to use the shader with ECS-rendered entities, an error is thrown stating that a BatchDrawCommand is using a pass that is not SRP Batcher compatible due to "UnityPerMaterial CBuffer inconsistent size inside a SubShader" (GBuffer).

To Reproduce Steps to reproduce the behavior:

Set up a new Unity project with the latest ECS package installed. Import the "Quibli" assets into the project. Create a new entity with a Renderer component in ECS. Assign a material using the "Quibli/Stylized Lit" shader to the Renderer component. Run the scene and observe the error in the console. Expected behavior The "Quibli/Stylized Lit" shader should be compatible with ECS and render entities without throwing errors, allowing the BatchRendererGroup to process draw commands efficiently.

Unity details: Unity Version: 2022.3.16f1 Entites Version: 1.0.16

dustyroom-studio commented 4 months ago

Hi! Can you please share the debug info from the [Readme] file?

On Sun, Apr 7, 2024, 21:07 周士培 @.***> wrote:

Describe the bug The "Quibli/Stylized Lit" shader appears to be incompatible with Unity's ECS mode. When attempting to use the shader with ECS-rendered entities, an error is thrown stating that a BatchDrawCommand is using a pass that is not SRP Batcher compatible due to "UnityPerMaterial CBuffer inconsistent size inside a SubShader" (GBuffer).

To Reproduce Steps to reproduce the behavior:

Set up a new Unity project with the latest ECS package installed. Import the "Quibli" assets into the project. Create a new entity with a Renderer component in ECS. Assign a material using the "Quibli/Stylized Lit" shader to the Renderer component. Run the scene and observe the error in the console. Expected behavior The "Quibli/Stylized Lit" shader should be compatible with ECS and render entities without throwing errors, allowing the BatchRendererGroup to process draw commands efficiently.

Unity details: Unity Version: 2022.3.16f1 Entites Version: 1.0.16

— Reply to this email directly, view it on GitHub https://github.com/dustyroom-studio/quibli-doc/issues/28, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARZVF6THWZKYXKOKWGSM3TDY4IJZTAVCNFSM6AAAAABF353N7SVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIZTAMRQHE4DQMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ZingZhou commented 4 months ago

Hi DustyroomStudio,

I will send you the questions tomorrow.

Best regards,ZingZhou


发件人: Dustyroom @.> 发送时间: 2024年4月9日 8:34 收件人: dustyroom-studio/quibli-doc @.> 抄送: 周士培 @.>; Author @.> 主题: Re: [dustyroom-studio/quibli-doc] ECS Incompatibility: 'Quibli/Stylized Lit' Shader SRP Batcher Error (Issue #28)

Hi! Can you please share the debug info from the [Readme] file?

On Sun, Apr 7, 2024, 21:07 周士培 @.***> wrote:

Describe the bug The "Quibli/Stylized Lit" shader appears to be incompatible with Unity's ECS mode. When attempting to use the shader with ECS-rendered entities, an error is thrown stating that a BatchDrawCommand is using a pass that is not SRP Batcher compatible due to "UnityPerMaterial CBuffer inconsistent size inside a SubShader" (GBuffer).

To Reproduce Steps to reproduce the behavior:

Set up a new Unity project with the latest ECS package installed. Import the "Quibli" assets into the project. Create a new entity with a Renderer component in ECS. Assign a material using the "Quibli/Stylized Lit" shader to the Renderer component. Run the scene and observe the error in the console. Expected behavior The "Quibli/Stylized Lit" shader should be compatible with ECS and render entities without throwing errors, allowing the BatchRendererGroup to process draw commands efficiently.

Unity details: Unity Version: 2022.3.16f1 Entites Version: 1.0.16

― Reply to this email directly, view it on GitHub https://github.com/dustyroom-studio/quibli-doc/issues/28, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARZVF6THWZKYXKOKWGSM3TDY4IJZTAVCNFSM6AAAAABF353N7SVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIZTAMRQHE4DQMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

― Reply to this email directly, view it on GitHubhttps://github.com/dustyroom-studio/quibli-doc/issues/28#issuecomment-2043933950, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AE6BT7KSXQI3TM2466CDB2DY4MZPTAVCNFSM6AAAAABF353N7SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBTHEZTGOJVGA. You are receiving this because you authored the thread.Message ID: @.***>

ZingZhou commented 4 months ago

Hey Dustyroom, This is Error [cid:03fed02e-6d7a-4588-9736-cb310f238587] [cid:89020b15-c393-402e-b52a-aeefa0f4b519] A BatchDrawCommand is using the pass "ForwardLit" from the shader "Quibli/Stylized Lit" which does not define a DOTS_INSTANCING_ON variant. This is not supported when rendering with a BatchRendererGroup (or Entities Graphics). MaterialID: 4 ("Kitchenware_04_Vase02"), MeshID: 1 ("Cube"), BatchID: 1. ZingZhou


发件人: Dustyroom @.> 发送时间: 2024年4月9日 8:34 收件人: dustyroom-studio/quibli-doc @.> 抄送: 周士培 @.>; Author @.> 主题: Re: [dustyroom-studio/quibli-doc] ECS Incompatibility: 'Quibli/Stylized Lit' Shader SRP Batcher Error (Issue #28)

Hi! Can you please share the debug info from the [Readme] file?

On Sun, Apr 7, 2024, 21:07 周士培 @.***> wrote:

Describe the bug The "Quibli/Stylized Lit" shader appears to be incompatible with Unity's ECS mode. When attempting to use the shader with ECS-rendered entities, an error is thrown stating that a BatchDrawCommand is using a pass that is not SRP Batcher compatible due to "UnityPerMaterial CBuffer inconsistent size inside a SubShader" (GBuffer).

To Reproduce Steps to reproduce the behavior:

Set up a new Unity project with the latest ECS package installed. Import the "Quibli" assets into the project. Create a new entity with a Renderer component in ECS. Assign a material using the "Quibli/Stylized Lit" shader to the Renderer component. Run the scene and observe the error in the console. Expected behavior The "Quibli/Stylized Lit" shader should be compatible with ECS and render entities without throwing errors, allowing the BatchRendererGroup to process draw commands efficiently.

Unity details: Unity Version: 2022.3.16f1 Entites Version: 1.0.16

― Reply to this email directly, view it on GitHub https://github.com/dustyroom-studio/quibli-doc/issues/28, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARZVF6THWZKYXKOKWGSM3TDY4IJZTAVCNFSM6AAAAABF353N7SVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIZTAMRQHE4DQMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

― Reply to this email directly, view it on GitHubhttps://github.com/dustyroom-studio/quibli-doc/issues/28#issuecomment-2043933950, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AE6BT7KSXQI3TM2466CDB2DY4MZPTAVCNFSM6AAAAABF353N7SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBTHEZTGOJVGA. You are receiving this because you authored the thread.Message ID: @.***>