Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Joachims bug fixes #8

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Joachims bug fixes #8

wants to merge 2 commits into from

Conversation

JoachimBose
Copy link
Contributor

Tested on a non-VR setting

@jdonkervliet
Copy link
Member

jdonkervliet commented Aug 19, 2024

Awesome! Could you please split this into multiple PRs (bug fixes, VR support, etc.)?

If these are only bug fixes, let me know. We can reopen the PR.

Copy link
Member

@jdonkervliet jdonkervliet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with the bug fixes but some polishing and additional documentation is needed. :))

//#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"

//#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
//#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/UnityInstancing.hlsl"
Copy link
Member

@jdonkervliet jdonkervliet Aug 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be deleted? I prefer not to have commented code unless there is a good reason for it.

This comment applies to all added lines with commented code.

@@ -8,7 +8,7 @@ Shader "Custom/BasicVoxelShader"
SubShader
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does the shader need to be changed? What is the bug?

// to Opencraft-2/Packages/PolkaDOTS/Runtime/Configuration/Applicationconfig.cs
//and uncomment this line:
// return ApplicationConfig.renderDistance.Value;
//Because this breaks polkaDOTS' abstraction model, this is not desired as default
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a good solution. I would like this value to be configurable. What's the issue with the abstraction? We can also discuss on Slack if needed.

nearbyColumns.Add(playerColumn + new int2(i,k));
int2 targetCol = playerColumn + new int2(i, k);

nearbyColumns.Add(targetCol);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible debugging artifact?

// Mark areas that need to be spawned
areasPlayersCloseTo.ExceptWith(ChunksToSpawnSnapshot);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add documentation here and throughout the code to explain what the code is doing.

In this case, this line prevents adding duplicate entries to chunksToSpawnBuffer.

Maybe we can merge this change, but it's not really the best solution imo because we are now marking columns to be generated every frame and cancel almost all of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants