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

The VertexLit shaders fail to Build in Unity for the UWP Win 10 HoloLens with light baking #22

Closed
reneschulte opened this issue Apr 29, 2016 · 7 comments

Comments

@reneschulte
Copy link

The HoloToolKit VertexLit shaders fail to Build in Unity for the UWP Win 10 HoloLens target when light baking is turned on:

Error building Player: Shader error in 'HoloToolkit/Vertex Lit Configurable': invalid subscript 'texcoord1' at Assets/HoloToolkit/Shaders/VertexLitConfigurable.cginc(67) (on d3d11)

Compiling Vertex program with DIRECTIONAL SHADOWS_OFF LIGHTMAP_ON DIRLIGHTMAP_COMBINED DYNAMICLIGHTMAP_OFF
Platform defines: UNITY_NO_SCREENSPACE_SHADOWS UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF3 UNITY_HARDWARE_TIER1

@NeerajW
Copy link

NeerajW commented May 3, 2016

@teichgraf thanks Rene for filing this. Do you have a proposal to fix this? Would you like to try to fix this?

@NeerajW NeerajW added the bug label May 13, 2016
@reneschulte
Copy link
Author

reneschulte commented Jun 16, 2016

Is this being worked on or does it still make sense to investigate a fix proposal?

@NeerajW
Copy link

NeerajW commented Jun 17, 2016

@teichgraf do you have a proposed fix for this? Would you like to fix this?

@ignavus
Copy link

ignavus commented Nov 29, 2016

I am no shader expert by any mean, but I encountered this, as I far as I understand the texcoord1 is the texture of the lightmap that will be sent to the shader along with its normal texture in the case of having lightmap enabled
The problem is while texcoordis that texcoord1 is not defined in the appdata_t struct in the file "VertexLitConfigurable.cginc" so when trying to access it while having baked GI enabled it results in that error, when I added the following lines to the file after the definition of texcoord. it worked fine

struct appdata_t
{
    float4 vertex   : POSITION;
    #if _USEMAINTEX_ON || _USEEMISSIONTEX_ON
        float2 texcoord : TEXCOORD0;
    #endif

	#ifndef LIGHTMAP_OFF
		float2 texcoord1 : TEXCOORD1;
	#endif
    float3 normal : NORMAL;
};

Again I am no shader expert, and this may cause bugs I am not aware of

@StephenHodgson
Copy link
Contributor

@teichgraf, there was some shader updates recently. Has those updates resolved this issue?

@ignavus Would you be willing to submit a PR with those fixes you've detailed?

@StephenHodgson
Copy link
Contributor

@dbastienMS did your recent updates fix this?

@StephenHodgson
Copy link
Contributor

New shaders have fixed this issue.

keveleigh pushed a commit that referenced this issue Aug 7, 2018
Orientation was being reset right before the teleport was started
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

No branches or pull requests

4 participants