public void CopyInstanceWithoutKeywordTest() { try { ShaderOptions shaderOptions = ShaderOptions.CreateExample0(); ShaderOptions newShaderOptions = ShaderOptions.CreateEmpty(); ShaderOptions.Accessor.CopyWithoutKeywords(shaderOptions, newShaderOptions); shaderOptions.Mode.AreNotEqual(newShaderOptions.Mode); shaderOptions.Values0.AreEqual(newShaderOptions.Values0); shaderOptions.Values1.AreEqual(newShaderOptions.Values1); } finally { ReleaseTemporary(); } }
public void GlobalAssignmentTest() { try { ShaderOptions shaderOptions = ShaderOptions.CreateExample0(); ShaderOptions.Accessor.SetGlobalValues(shaderOptions); var newShaderOptions = ShaderOptions.CreateEmpty(); ShaderOptions.Accessor.GetGlobalValues(newShaderOptions); shaderOptions.Mode.AreEqual(newShaderOptions.Mode); shaderOptions.Values0.AreEqualWithoutTextureOffsetScale(newShaderOptions.Values0); shaderOptions.Values1.AreEqual(newShaderOptions.Values1); } finally { ReleaseTemporary(); } }
public void GlobalAssignmentMaskTest() { try { int mask = (int)(Mask.Group0 | Mask.Group1 | Mask.Group2); ShaderOptions shaderOptions = ShaderOptions.CreateExample0(); ShaderOptions.Accessor.SetGlobalValues(shaderOptions, group => ShaderAccessor.FilterByMask(group, mask)); var newShaderOptions = ShaderOptions.CreateEmpty(); ShaderOptions.Accessor.GetGlobalValues(newShaderOptions); shaderOptions.Values0.AreEqualWithoutTextureOffsetScale(newShaderOptions.Values0); shaderOptions.Values1.AreNotEqual(newShaderOptions.Values1); } finally { ReleaseTemporary(); } }