Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
This question was closed Feb 26, 2018 at 03:00 AM by Ginxx009 for the following reason:

The question is answered, right answer was accepted

avatar image
2
Question by Ginxx009 · Dec 04, 2017 at 07:05 AM · androidunity 5shadersopengl es2.0

Unity Shader Invalid Subscript 'boxMax'

My error is this:

Shader error in 'Volund/Standard Character (Specular) ' : invalid subscript 'boxMax' at Assets/Features/Shared/Volund_UnityStandardCore.cginc(261) (on d3d11)

Compiling Vertex program with DIRECTIONAL _NORMALMAP _SPECGLOSSMAP

Platform defines: UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDf2 SHADER_API_DESKTOP UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA

I pasted the full error above so please do see it.

And Below is my code of the shader:

 d.boxMax[0] = unity_SpecCube0_BoxMax;
 d.boxMin[0] = unity_SpecCube0_BoxMin;
 d.probePosition[0] = unity_SpecCube0_ProbePosition;
 d.probeHDR[0] = unity_SpecCube0_HDR;
 
 d.boxMax[1] = unity_SpecCube1_BoxMax;
 d.boxMin[1] = unity_SpecCube1_BoxMin;
 d.probePosition[1] = unity_SpecCube1_ProbePosition;
 d.probeHDR[1] = unity_SpecCube1_HDR;

because of that error Now i changed it to this:

 #if UNITY_SPECCUBE_BLENDING || UNITY_SPECCUBE_BOX_PROJECTION
     d.boxMin[0] = unity_SpecCube0_BoxMin;
     d.boxMin[1] = unity_SpecCube1_BoxMin;
 #endif
 
 
 #if UNITY_SPECCUBE_BOX_PROJECTION
     d.boxMax[0] = unity_SpecCube0_BoxMax;
     d.boxMax[1] = unity_SpecCube1_BoxMax;
     d.probePosition[0] = unity_SpecCube0_ProbePosition;
     d.probePosition[1] = unity_SpecCube1_ProbePosition;


error now: variable 'd' used without having been completely initialized.

What my problem here is i successfully converted my .exe application to .apk application but the when i opened it on my device it's just a dark screen and it show the error above after i build it. What could be the problem? Cause i'm speculating that the error above is cause

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

  • Sort: 
avatar image
5
Best Answer

Answer by Ginxx009 · Feb 26, 2018 at 02:59 AM

For everyone that doesn't solve their problem with the answer of @dishant27 here's what i did

Method_1

 #if UNITY_SPECCUBE_BOX_PROJECTION
         d.boxMax[0] = unity_SpecCube0_BoxMax;
         d.probePosition[0] = unity_SpecCube0_ProbePosition;
         d.boxMax[1] = unity_SpecCube1_BoxMax;
         d.boxMin[1] = unity_SpecCube1_BoxMin;
         d.probePosition[1] = unity_SpecCube1_ProbePosition;
 #endif

Method_2 By @dishant27

Go to Edit-> Project Settings -> Graphics. Uncheck "Use Default" in Tier1 and then, check "Reflection probes box projection". If, it doesn't work try doing the same for Tier2 and Tier3.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image rireach · Aug 28, 2018 at 07:37 AM 0
Share

worked for me, thanks

avatar image araz01 · Mar 06, 2020 at 02:16 AM 0
Share

what the hell is that and where do i put it?

avatar image
8

Answer by dishant27 · Dec 06, 2017 at 10:35 AM

This method worked for me. Go to Edit-> Project Settings -> Graphics.

Uncheck "Use Default" in Tier1 and then, check "Reflection probes box projection". If, it doesn't work try doing the same for Tier2 and Tier3.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Aubrey-Falconer · Dec 07, 2017 at 04:43 AM 0
Share

Thanks @dishant27! You just saved me from a similar fate.

avatar image YouTen108 · Dec 17, 2017 at 04:13 PM 0
Share

@dishant27 THAN$$anonymous$$ YOU Very much Bro you saved me also !

avatar image PackofDoom · Jan 24, 2018 at 08:22 PM 0
Share

This worked for me too. Thank you sooooo much!

avatar image MikeWise · Jul 16, 2019 at 09:55 AM 0
Share

Worked for me, I did i for all three Tiers, don't see why you would ever leave one out.

Follow this Question

Answers Answers and Comments

277 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

is device supported to cardboard game or not? 0 Answers

Unity Ads rewarded video no result, Android 1 Answer

Unity 2017.2.0b9 ARCore build&run with Pixel XL (Android 8.0) Failed 0 Answers

Unity Android Voice Recognition 0 Answers

Monetization breaks iOS build in XCode. Also breaks Android build. 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges