Sitelet https://github.com/CaffeineViking/vkhr/issues/55
Skip to content

why view direction eye_normal starts from eye? #55

Description

@cedarz

https://github.com/CaffeineViking/vkhr/blob/master/share/shaders/strands/strand.frag#L45

vec3 eye_normal = normalize(fs_in.position.xyz - camera.position);

eye_normal is as input for kajiya_kay, and the result specular highlights have some difference.

if using vec3 eye_normal = normalize(fs_in.position.xyz - camera.position);

Image

else if use 'vec3 eye_normal = -normalize(fs_in.position.xyz - camera.position);`

Image

But the eye_nomal of other implementations I find is vec3 eye_normal = normalize(fs_in.position.xyz - camera.position); from pos (of model) to eye, can you give me some hints?

PS: I disable occlusion and shadow when capturing the screenshots

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions