Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon
29. January 2016


Title pretty much says it all.  Unity just announced device support for the New Nintendo 3DS (that is actually the name, called the 3DS LL in Japan).  In case you are wondering, yes Unity already supported the 3DS as a platform, this announcement is specifically about the new model.  It appears to be a version of Unity 5.1 at this point and interestingly, this release ships with only IL2CPP, so there is no Mono runtime.  This should result in greater speeds, but may have a few unseen consequences.  You still need to be registered in Nintendo’s Developer program to gain access.


Excerpt from the announcement:

We announced our intention to support Nintendo’s recently released New Nintendo 3DS platform at Unite Tokyo and we’ve been very busy in the meantime getting it ready.  Now we’re pleased to announce it’s available for use today!

The first question people usually ask is “do you support the original Nintendo 3DS too?”  To which the answer is a qualified “yes”. We can generate ROM images which are compatible with the original Nintendo 3DS, and there are certainly some types of game which will run perfectly well on it, but for the majority of games we strongly recommend targeting the New Nintendo 3DS for maximum gorgeousness.

We’ve been working very closely with select developers to port a few of their existing games to New Nintendo 3DS. We’ve been busy profiling, optimizing, and ironing out the niggles using real-world projects, so you can be confident your games will run as smoothly as possible. In fact, one game has already successfully passed through Nintendo’s exacting mastering system; Wind Up Knight 2 went on sale at the end of last year!

Unity’s internal shader code underwent a number of significantchanges in the transition from version 5.1 to 5.2.  This brought many benefits, including cleaner and more performant code, and also fixed a number of issues we had on console platforms.  We’re not able retrofit those fixes to the 5.1 based version, so we shall only be actively developing our shader support from version 5.2 onwards.

We’ve been putting Unity for New Nintendo 3DS version 5.2 through its paces for a few months, and it’ll be made available once it’s proved itself by getting a game through Nintendo’s mastering system too.  That should be in the near future, but it’s not something that’s easy to put a date on.

So far, we’ve been in development with a Nintendo 3DS-specific version of the Unity editor, but now we’ve switched our focus towards upgrading to the latest version, with a view to shipping as a plug-in extension to the regular editor.  We have a 5.3 based version running internally, and we’re working hard to get it merged into our mainline code-base.

It should be mentioned that some features are not yet implemented in this first public release, notably UNet and Shadow Maps (although Light-Maps are supported). We’re prioritising new features according to customer demand, but right now our main goal is to get into the regular editor.

In common with other mobile platforms, there are some limitations as to what can be achieved with the hardware. For instance, Unity’s Standard Shader requires desktop-class graphics hardware so it’s not something we can support on Nintendo 3DS. However, as with other platforms, if you try to use a shader which is unsupported then Unity will fall-back to a less complex shader that gives the best possible results.

GameDev News

28. January 2016


Another week another Unity patch.  Windows version available here, while the Mac version is available here.  This one is composed of the usual assortment of bug fixes and improvements:

  • IL2CPP: Removed warnings from generated C++ code when compiling with clang.
  • (754282) - 2D: Fixed memory leak when applying changes to sprite.
  • (741003) - Android: Fixed internal profiler on Gear VR.
  • (738843) - Android: Timeout no longer happens when an application is sent to the background.
  • (756198) - AssetBundle: Loading multiple invalid asset bundles fails correctly now.
  • (736556) - AssetBundle: Change to use natural sorting when listing the AssetBundle names.
  • (756567) - AssetBundle: Fixed the AssetBundle loading error which was built with DisableWriteTypeTree enabled.
  • (716166) - AssetBundle: Fixed the hash collision when building AssetBundles.
  • (743704) - AssetBundle: Fixed the issue that LoadAsset(name) returns null if a bundle contains a prefab and another asset with the same name.
  • (715753) - AssetBundles: Fixed AssetBundle.CreateFromFile retaining file descriptor. - The previous fix was incomplete.
  • (760985) - Audio: Fixed mixer reverb effects getting cut off early in standalone builds.
  • (757799) - Core: Fixed crash when game object that is a child of a missing prefab is deleted.
  • (750117) - Editor: Fixed game object duplicates on play when reference to that game object is set in another scene.
  • (none) - Frame Debugger: Even when it was not used, it was creating some overhead in development standalone builds. Reduced that.
  • (756849) - Graphics: Fixed crash when calling Graphics.DrawMesh with null material.
  • (none) - Graphics: Fixed gpu memory leak in the splash animation.
  • (740782) - Graphics: Fixed a crash in the editor when switching graphics API from a non-DX9 API e.g. DX11.
  • (none) - Graphics: Fixed profiling related information (SetGpuProgramName) performance issue in development player builds.
  • (760665) - Graphics: Fixed SkinMeshInfo memory leak.
  • (724664) - Graphics: Textures imported as cubemaps now are properly marked as non-readable if import option says so. Saves memory!
  • (724547) - IL2CPP: Implemented support for Assembly.GetReferencedAssemblies and Module.GetTypes()
  • (none) - iOS/Xcode: Added .tbd extension support.
  • (759212) - iOS: Fixed code completion for iOS Editor Extensions.
  • (759459) - Mono: Corrected a crash in mono_string_to_utf8_checked when Marshal.StructureToPtr is called from managed code.
  • (none) - Mono: Resolved intermittent crash caused by a race condition that occurs when using managed threads.
  • (none) - OpenGL ES & desktop OpenGL (Shader compiler): Various bug fixes and performance improvements.
  • (756786) - Particles: Fixed IsFinite error spam with particles and second camera.
  • (756971) - Particles: Fixed issue where particle system is stopped and cleared and after that it won't play when simulation space is set to local.
  • (756194) - Particles: Fixed: particle system only playing once.
  • (756725) - Particles: Fixed: particle system not playing when triggered via Event Trigger.
  • (696610) - Particles: Fixed issue where particles are not drawn in the correct order on rotated particle systems.
  • (759502) - Particles: Fixed the issue of particles disappearing after going offscreen and returning.
  • (756742) - Particles: Fixed issue whereby particles systems are not looping correctly.
  • (755677) - Particles: Fixed issue where ParticleSystem.IsAlive() always returns True for particle systems with longer duration.
  • (723993) - Particles: Fixed wrong culling of some particle objects caused by incorrect bounds calculation due to parent scaling.
  • (757461) - Particles: Fixed issue where particle system doesn't play if method is called via Invoke fixed.
  • (745121) - Particles: Particles are now emitted with the correct position//rotation when using a Skinned Mesh Renderer or Mesh Renderer as shape.
  • (754405) - Scripting: Fixed issue that causes UnityScript to incorrectly detect some methods return type.
  • (739376), (740617) - UI: Fixed "Trying to add (Layout Rebuilder for) Content (UnityEngine.RectTransform) for layout rebuild while we are already inside a layout rebuild loop." error.
  • (753423), (758106) - UI: Fixed flickering/texture swapping issues.
  • (747512) - UI: Fixed issue with incorrect accent calculation for non-dynamic fonts.
  • (759841) - VR: Fixed crash when trying to enter play mode when the Plugin was not loaded or the Oculus runtime was not installed.
  • (755122), (717989), (734122) - VR: Fixed Skybox clipping issue.
  • (none) - VR: Fixed VR Focus and VR ShouldQuit not respecting notifications when the Device was disconnected.
  • (none) - XboxOne: Fixed a bug with YUY2 processing on the XboxOne.

GameDev News

26. January 2016


Phong shading has been somewhat the gold standard as far as game engines go.  The Phong algorithm, named after founder Bui Tuong Phong, is an algorithm for how light interacts with a 3D surface.  With the upcoming Unity 5.4 release however, Unity will be moving from Phong to GGX shading.  For more details on GGX shading, you can read the original paper Microfacet Models for Refraction through Rough Surfaces.


As to why Unity is changing shader models, you can read on here, or excerpt below:

In Unity 5.3 Standard Shader we have switched to GGX as the BRDF of choice for both analytical lights such as point/directional light but also for image based lighting. Furthermore, a complete overhaul has been performed on our implementation for convolution of cube maps to achieve both accurate and noiseless results at low execution time (latter part is in Unity 5.4). The most characteristic difference between GGX and normalized Phong is that the microfacet distribution profiles associated with GGX has a higher and more narrow spike followed by a prevailing tail as we see here.

Profiles for GGX and Normalized Phong.

The impact of this on the final lit result is GGX has a brighter highlight followed by a trailing halo as shown below which gives a more realistic appearance.

Comparison between GGX and conventional normalized phong.

Cross-industry Compatible Materials

In academics physically based BRDFs use roughness as the parameter to control the microfacet distribution function. Academic roughness is defined as the root mean square slope of the profile. A common misunderstanding is that roughness maps in CG are the same as academic roughness which is not the case. The reason academic roughness is not used for texture maps or sliders is because the “blur levels” are not evenly distributed which is both very difficult to work with but also leverages the limited bit precision of a texture map poorly. To avoid confusion Unity uses smoothness instead of roughness maps where smoothness is converted into academic roughness in the shader using the formula (1-smoothness)^2. Distribution wise this is equivalent to Burley’s roughness but reversed such that the most blurry response maps to 0.0 and perfect mirror reflection maps to 1.0 which we find more intuitive.

The significance to such a standardized distribution is it allows you to import content into Unity made with external tools and achieve close/similar results. Most CG painting tools today support smoothness maps. To be clear an identical match is not guaranteed but proportionality between diffuse and specular brightness and overall blurriness of the specular reflection should be close. The following comparison shot between Unity 5 and Substance Painter was kindly provided by Wes McDermott from Allegorithmic.

As we see the visuals are very similar. I would also like to thank Wes and Allegorithmic for their collaboration and helpful iteration on this. For more details on the subject people are encouraged to check out their detailed course on PBR and Unity 5.

GameDev News

22. January 2016


As always the patch can be downloaded here.  This patch contains:

  • Documentation: In the scripting API, added information to Graphics.SetRenderTarget() and CommandBuffer.SetRenderTarget() about using linear lighting mode. Updated the wording about using linear lighting mode in the Graphics.Blit() entry.
  • iOS/IL2CPP: Added support for Xcode 7.3 (don't use __declspec attributes).
  • Samsung TV: Added support for 2016 TVs.
  • MSE: Prevent calling some Editor mode only APIs on EditorSceneManager from play mode, including EditorSceneManager.OpenScene, EditorSceneManager.SaveScene etc.
  • MSE: Prevent calling some play mode only APIs on SceneManager from Editor mode, including SceneManager.LoadLevel, SceneManager.LoadLevelAsync etc.
  • (745139) - Animation: Fixed an issue with stepped keys having the wrong value.
  • (745781) - Animation: Fixed animation events not firing on the last frame of a looping animation.
  • (754373) - Animation: Fixed crash when deleting all Euler keys in animation curve
  • (753866) - Animation: Fixed Crossfade called subsequently not properly interrupting transition.
  • (none) - AssetBundles: Fixed the assetbundle reading bug when compressed data could be read as uncompressed.
  • (715753) - AssetBundles: Fixed AssetBundle.CreateFromFile retaining file descriptor.
  • (none) - AssetBundles: Fixed memory leak when loading asset bundles with lzma compression.
  • (none) - AssetBundles: Fixed possible assetbundle caching error when starting multiple downloads with an empty cache.
  • (747492) - Direct3D: improved performance in GPU bound scenarios.
  • (754487) - Graphics (Editor): In play mode set the graphics device sRGB write mode to match the lighting mode e.g. enable sRGB write mode in linear lighting mode.
  • (none) - Graphics: Fixed crash when setting shader properties.
  • (760943) - IL2CPP: Do not incorrectly free blittable arrays marshaled as [In,Out] parameters.
  • (758926) - IL2CPP: Prevent a NotImplementedException exception from occurring in il2cpp.exe when the Unbox opcode is used with certain generics. This usually occurs when an assembly is built with Visual Studio.
  • (none) - IL2CPP: Removed an unnecessary Box used to null check before calling a virtual method.
  • (none) - iOS: Fixed Apple Pencil position reporting on iPad Pro.
  • (754068) - Lines & Trails: Fixing issue where rendering in VR was offset for one eye.
  • (752423) - MSE: Fixed a crash when trying to get the root count on an invalid Scene.
  • (751923) - MSE: Fixed loading new unsaved scene during playmode using Application.LoadLevel(index) or SceneManager.LoadScene(index).
  • (753550) - MSE: Now make sure inspector in ActiveEditorTracker for MonoBehaviours are not garbage collected. The ActiveEditorTracked manages the objects itself.
  • (752599) - MSE: Throw null reference exception if SerializedObject has been disposed.
  • (none) - OpenGL (legacy): Added work around buffer state tracking failure.
  • (742591) - OpenGL: Fixed binary shader cache, cache was always disabled because of a bug in the caps.
  • (751743) - OpenGL: Fixed mipmap generation for render textures using OpenGLES.
  • (none) - Samsung TV: Fixed the smarthub button problem.
  • (none) - Substance: Fixed console spam about unavailable material properties.
  • (752039) - Substance: Fixed a crash when checking/unchecking  'Generate all outputs' or 'Generate mipmaps' on OSX.
  • (751300) - Substance: Fixed a crash when reimporting SBSARs with multiple material instances on OSX.
  • (663236) - Substance: Fixed editor stutter when using RebuildTextures on OSX.
  • (none) - Substance: Fixed emission color being set to opaque white when resetting a ProceduralMaterial.
  • (754556) - Substance: Fixed textures not properly generated on player awake when affected only by constant inputs.
  • (none) - Substance: Output textures from ProceduralMaterials without any input are now always generated.
  • (740182) - WebGL: Prevent browser from processing Arrow Keys.
  • (747236) - WebGL: Prevent browser from processing Backspace and Tab key presses.
  • (747549) - Windows Store: Fixed AccessViolationException when initializing matchmaking in UNet.
  • (755473) - Windows Store: Fixed TouchScreenKeyboard crashes when it's members are used immediately after Open().

GameDev News

14. January 2016


Remember when you used to wait months to years for updates for your game engine?  Isn’t competition a wonderful thing?   Along with today’s Unreal Preview release we get word of the new weekly Unity patch, 5.3.1p3.


From the release notes:

  • Added link to learn more about Unity Cloud Build in the Build Player window.
  • Tizen: Now supports tizenstore URL protocol to open up tizen store pages.
  • VR: Applications that lost Focus no longer throttle the CPU.
  • (753610) - IL2CPP: Fixed StateMachineBehaviour messages not being executed if stripping is enabled.
  • (none) - [API Updater] Fixed possible crashes in ScriptUpdater.exe when resolving types.
  • (none) - [AssetLoading]: Fixed excessive memory usage when decompressing assetbundles with many objects inside (very large serializedfile).
  • (none) - [Profiler] Fixed excessive memory usage in development players.
  • (750442) - [Substance]: Fixed a rare crash that could happen around the destruction of animated ProceduralMaterials.
  • (none) - [Windows 10]: Fixed incorrect display of Korean characters on Windows 10 (if Korean language pack is not installed) and Windows Phone 10, Unity will now fallback to "Malgun Gothic" font.
  • (743739) - Android: Fixed a crash when loading many asset bundles.
  • (754108) - Editor: Display console documentation items in the help menu, when console docs are present, but the main documentation is not installed.
  • (754928) - Fixed an issue where enabling vertex compression for positions could result in geometry not being rendered.
  • (755088) - IL2CPP: Ensure that the header file for a type defined in a different assembly is included when that type is used for a method parameter.
  • (752197) - IL2CPP: Fixed double.Parse with InvariantCulture.
  • (756447) - IL2CPP: Forward declare a type and marshaled type in the method declarations header for marshaling methods so that the order of includes does not matter.
  • (670027) - IL2CPP: Implemented support for MetadataToken property on the following types: FieldInfo, EventInfo, MethodInfo, ConstructorInfo, PropertyInfo, Type, and Module.
  • (754539) - iOS/IL2CPP: Correct stack traces in exception messages, which could sometimes miss managed frames.
  • (754562) - Mecanim: Fixed a bug where Euler rotations would be retained in scene after scrubbing animation.
  • (752955) - Mecanim: Fixed a bug where Euler rotations would not work in Legacy Animations.
  • (748936) - Networking: Added a 'connecting' state and cancel button to NetworkManagerHUD UI to prevent multiple attempts to connect at the same time.
  • (757766) - Networking: Fixed 'recursion depth exceeded' error for complex NetworkBehaviour scripts.
  • (746011) - Networking: Fixed ClientScene object list being wrong after host migration.
  • (755391) - Networking: Fixed NetworkAnimator not working for non-player objects
  • (756153) - Networking: Fixed NetworkServer.SendToAll sends the message to the host twice.
  • (755450) - Networking: Fixed SyncEvent regression issue.
  • (745795) - Networking: Fixed SyncList updates don't use a configurable network channel.
  • (744002) - Networking: Fixed UI that allowed host migration to be enabled for WebGl platform where it is not supported.
  • (751239) - Networking: OnStopAuthority called on server when it should not be.
  • (729157) - Networking: Prevent [Command] functions from accepting NetworkConnection objects as parameters, which causes a UNetWeaver error.
  • (749338) - Networking: Prevent NetworkIdentity objects from being server-only and local-player-authority at the same time, as this is not a valid configuration.
  • (744007) - Physics: Fixed memory corruption/crash when deactivating a collider from inside of OnTriggerStay.
  • (755612) - Physics: PlatformEffector2D now supports negative scaling on parent Transform.
  • (750266) - Scripting: UnusedByteCodeStripper2 will show a better error message when processing assemblies, so it will be easier to identify offending assembly.
  • (759336) - Shaders: During surface shader generation, do not initialise non-vector type members of the Input struct i.e. a struct/int/matrix as a member variable of the Input struct.
  • (none) - UI: Added fix so that the placeholder text is enabled when the InputField is deactivated and the text is empty.
  • (741751) - UI: Removed remaining uses of multiple display system.(Temporary fix whilst none native resolutions are not supported).
  • (731324) - VR: Fixed Render Scale not reverting after being edited in play mode.
  • (732236) - VR: Fixed VRDevice.isPresent reporting true on first frame if Device was not connected at start.
  • (753256) - VR: Stereo Cameras correctly respect camera depth when rendering to the game view and HMD.
  • (754533) - Windows Store: Fixed a build failure (rrw failure) when calling methods with System.Numerics.Matrix4x4 as parameter.
  • (756086) - Windows Store: Fixed Screen.SetResolution when upscaling lower resolution to fullscreen, previously you would see a corrupt image on the screen.
  • (730289) - Windows Store: Fixed WheelCollider on x64 (NullReferenceException occurring).
  • (746301) - Windows Store: Fixed player crashing on startup on .NET scripting backend.
  • (759166) - Windows Store: RunInBackground option will be respected when application window looses focus, and if enabled, the application will keep updating. Note: if application window is minimized it will be still paused, because OS suspends the application.

GameDev News

AppGameKit Studio

See More Tutorials on!

Month List