mirror of
https://github.com/Eragon-Brisingr/UShaderLab.git
synced 2026-09-16 23:34:38 +00:00
Add SL_FUNCTION and .uslfunc
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
// generated from FShaderLabIntrinsicRegistry. (The static
|
||||
// ShaderLab.ush umbrella includes it; it is IDE-only.)
|
||||
// 2. <Project>/.vscode/settings.json — merges (non-destructively) files.associations
|
||||
// (*.usl/*.usf/*.ush -> hlsl) and shader-validator.pathRemapping
|
||||
// (*.usl/*.uslfunc/*.usf/*.ush -> hlsl) and shader-validator.pathRemapping
|
||||
// (virtual shader roots -> disk, from AllShaderSourceDirectoryMappings).
|
||||
// pathRemapping is machine-specific; the command regenerates it.
|
||||
|
||||
@@ -338,8 +338,8 @@ namespace ShaderLabIDEPrepare_Private
|
||||
return Remap;
|
||||
}
|
||||
|
||||
// Merge files.associations (*.usl/*.usf/*.ush -> hlsl) and shader-validator.pathRemapping into
|
||||
// .vscode/settings.json, preserving all other keys. Rewrites only when something actually changed.
|
||||
// Merge files.associations (*.usl/*.uslfunc/*.usf/*.ush -> hlsl) and shader-validator.pathRemapping
|
||||
// into .vscode/settings.json, preserving all other keys. Rewrites only when something actually changed.
|
||||
static void MergeVSCodeSettings(const FString& ProjectDir)
|
||||
{
|
||||
const FString SettingsPath = FPaths::Combine(ProjectDir, TEXT(".vscode"), TEXT("settings.json"));
|
||||
@@ -368,7 +368,7 @@ namespace ShaderLabIDEPrepare_Private
|
||||
const TSharedPtr<FJsonObject>* AssocPtr = nullptr;
|
||||
const TSharedPtr<FJsonObject> Assoc = Settings->TryGetObjectField(TEXT("files.associations"), AssocPtr)
|
||||
? *AssocPtr : MakeShared<FJsonObject>();
|
||||
for (const TCHAR* Ext : { TEXT("*.usl"), TEXT("*.usf"), TEXT("*.ush") })
|
||||
for (const TCHAR* Ext : { TEXT("*.usl"), TEXT("*.uslfunc"), TEXT("*.usf"), TEXT("*.ush") })
|
||||
{
|
||||
FString Value;
|
||||
if (!Assoc->TryGetStringField(Ext, Value) || Value != TEXT("hlsl"))
|
||||
|
||||
Reference in New Issue
Block a user