33.2: Is_Null_Texture Bug Fix and Meet My CAT!

Опубликовано: 17 Июль 2020
на канале: 2etime
683
34

In the last video we added normal maps! However we also introduced a really annoying bug into our engine. This may not affect you in any way though so... lucky you. However I will be going around the bug in a very familiar way. Bringing back useBaseTexture! :)

Swift Game Engine Tutorial With Metal Playlist
https://www.youtube.com/watch?v=PcA-V…

Full Engine Code:
https://github.com/twohyjr/Metal-Game...

Episode Source Code:
https://github.com/twohyjr/Metal-Game...

Also Don't Do This In The Code:
if(_material.useBaseTexture || _material.useNormalMapTexture ) {
renderCommandEncoder.setFragmentSamplerState(Graphics.SamplerStates[.Linear], index: 0)
}
It creates a bug. Remove the if statement and just use
renderCommandEncoder.setFragmentSamplerState(Graphics.SamplerStates[.Linear], index: 0)

Become A Patron:
  / 2etime  

Metal Specification Documentation:
https://developer.apple.com/metal/Met…

Discord:
Join me on Discord for discussions about Metal. I am always open to talk code :)
  / discord  

Affiliate Links:
Sweet Standing Desks: http://bit.ly/2XxH13m
CGBoost(Awesome Blender Tutorials): https://cgboost.com/?affcode=206256_a...