This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Simplified SDF shader: | |
// - No Shading Option (bevel / bump / env map) | |
// - No Glow Option | |
// - Softness is applied on both side of the outline | |
Shader "TextMeshPro/Mobile/Distance Field Instanced" { | |
Properties { | |
_FaceColor ("Face Color", Color) = (1,1,1,1) | |
_FaceDilate ("Face Dilate", Range(-1,1)) = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<linker> | |
<assembly fullname="Microsoft.Identity.Client" preserve="all"/> | |
<assembly fullname="System.Runtime.Serialization" preserve="all"/> | |
</linker> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<linker> | |
<assembly fullname="Microsoft.Identity.Client" preserve="all"/> | |
</linker> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
res.res = await app.AcquireTokenWithDeviceCodeAsync(scopes, string.Empty, | |
deviceCodeCallback => | |
{ | |
// This will print the message on the console which tells the user where to go sign-in using | |
// a separate browser and the code to enter once they sign in. | |
// The AcquireTokenWithDeviceCodeAsync() method will poll the server after firing this | |
// device code callback to look for the successful login of the user via that browser. | |
// This background polling (whose interval and timeout data is also provided as fields in the | |
// deviceCodeCallback class) will occur until: | |
// * The user has successfully logged in via browser and entered the proper code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.Configure<CookiePolicyOptions>(options => | |
{ | |
// This lambda determines whether user consent for non-essential cookies is needed for a given request. | |
options.CheckConsentNeeded = context => true; | |
options.MinimumSameSitePolicy = SameSiteMode.None; | |
}); | |
services.AddAuthentication(AzureADDefaults.AuthenticationScheme) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>WebVR on Hololens</title> | |
<script src="https://aframe.io/releases/0.8.0/aframe.min.js"></script> | |
<script type="javascript"> | |
</script> | |
</head> | |
<body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void GLTF_Parser::ParseFile(StorageFile^ storageFile) | |
{ | |
// try to get an IStorageItemHandleAccess interface from the StorageFile | |
ComPtr<IUnknown> unknown(reinterpret_cast<IUnknown*>(storageFile)); | |
ComPtr<IStorageItemHandleAccess> fileAccessor; | |
ThrowIfFailed(unknown.As(&fileAccessor)); | |
// Use the IStorageItemHandleAccess::Create method to retrieve an OS HANDLE | |
shared_ptr<void> fileHandle; | |
HANDLE file = nullptr; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void MeshNode::CompileAndLoadPixelShader() | |
{ | |
// Create a shader descriptor which we can use to either find the shader in the | |
// shader cache or create and add it. | |
// The hash used for lookup is generated from the shader name and defines passed | |
// when it is compiled | |
ShaderDescriptor descriptor("pbrpixel.hlsl", DevResources()); | |
auto textures = _material->Textures(); | |
// Allocate the defines map... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef HAS_METALROUGHNESSMAP | |
// Roughness is stored in the 'g' channel, metallic is stored in the 'b' channel. | |
// This layout intentionally reserves the 'r' channel for (optional) occlusion map data | |
float4 mrSample = metallicRoughnessTexture.Sample(metallicRoughnessSampler, input.texcoord); | |
perceptualRoughness = mrSample.g * perceptualRoughness; | |
metallic = mrSample.b * metallic; | |
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I can declare a variable like this | |
subject<SceneManager const&> SceneChanged; | |
// subscribe for changes using an arbitrary function signature | |
sub_token RegisterForUpdates(function<void(SceneManager const&)> slot) | |
{ | |
return SceneChanged.subscribe(slot); | |
} | |
// Then when changes happen, notify observers like this.. |
NewerOlder