You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature ID attributes (only the explicit FEATURE_ID_n ones) show up in custom shaders as fsInput.attributes.featureId_n
However, we also want to support the following:
consistent method for referencing feature IDs. Each primitive has a list of feature ID sets (some from attributes, some from an implicit range, some from a texture). in the API "feature ID n" or "instance feature ID n" should refer to the n-th entry in these lists of feature IDs
multiple feature IDs in custom shaders. This should be seamless, the user shouldn't need to worry about texture reads
Overview
Right now, ModelExperimental only uses feature IDs for the following:
Model
EXT_mesh_features: handle feature IDs without a property table #9884 needs to be addressed.FEATURE_ID_n
ones) show up in custom shaders asfsInput.attributes.featureId_n
However, we also want to support the following:
n
-th entry in these lists of feature IDsHere are some initial notes of things that'll need to be updated. There's likely more details to consider as I implement this.
#9884 should be addressed first, then this issue.
CustomShader
[fv]sInput.featureIds.(featureId|instanceId)_(\d+)
featureId_n
corresponds to a position within a primitive's featureIds arrayinstanceId_n
corresponds to a position within the instance's featureIds arrayFeatureIdPipelineStage
ActiveFeaturePipelineStage
andFeatureIdPipelineStage
FeatureIds
dynamic structfeatureIds.(feature|instance)Id_n = a_featureId_m
featureIds.(feature|instance)Id_n = a_implicitFeatureId_m
featureIds.(feature|instance)Id_n = floor(texture2D(FEATURE_ID_TEXTURE, FEATURE_ID_TEXCOORD).FEATURE_ID_CHANNEL * 255.0 + 0.5);
CustomShaderPipelineStage
FeatureIds
tovsInput
andfsInput
ModelExperimental
featureIdAttributeIndex, featureIdTextureIndex
withfeatureIdIndex
andinstanceFeatureIdIndex
ModelExperimentalFS
Feature feature;
is global-scoped because of its use in picking (maybe also wrap in a#ifdef
clause?)The text was updated successfully, but these errors were encountered: