Used to be that RAW, the sniper wasn't getting the sneak attack. Why? No good reason other than that "a legalistic reading of the rules said so." There are no end of huge threads on paizo.com going over in tortuous detail how vision and stealth and all that work in PF core, especially here and here, and the summary was "slavishly following the rules means things that make no sense." You never get sneak attack from stealth because "you can't stealth while attacking" and "it doesn't say you get sneak attack just because someone can't see you, as hidden isn't an official condition (tm)."
I would previously invoke GM privilege to implement RAI - as in Pathfinder they say clearly "the GM is the law over and above the written rules" - and make it so they get their sneak attack. Because it makes sense from a game world logic/sim point of view and you can rule that's more important than the RAW point of view. IMO the clear intent was to sneak-attack someone from Stealth. You know, "sneak," "attack," things that happen in the real world and every previous edition of D&D.
Can I Attack From Stealth?
Now, however, the Stealth rules have been errata'ed to specifically say "you can attack from stealth" which means that yes, you get the sneak attack. See the updated version on the PRD which says:
Breaking Stealth: When you start your turn using Stealth, you can leave cover or concealment and remain unobserved as long as you succeed at a Stealth check and end your turn in cover or concealment. Your Stealth immediately ends after you make an attack roll, whether or not the attack is successful (except when sniping as noted below).
Sniping: If you've already successfully used Stealth at least 10 feet from your target, you can make one ranged attack and then immediately use Stealth again. You take a –20 penalty on your Stealth check to maintain your obscured location.
So the RAW has been updated to match the RAI for whatever that's worth (apparently it's really meaningful to some, though all my rogues have been happily sneak attacking from Stealth since the year 2000...).
Does A Stealthed Attack Enable Sneak Attack?
Yes, if you're stealthed, your attacks are sneak attacks.
Jason Buhlman states the intent clearly on the Paizo forums:
For simplicities sake, it should be assumed that those making Perception checks get to do so at the most favorable point during the movement of a character using Stealth, to avoid making checks every time the condition changes. Technically, I think you would get a check whenever the conditions change, but that might make things overly complicated during play.
Creatures are denied their Dexterity bonus to AC "if they cannot react to a blow" (CR pg 179 under AC). It was our intent that if you are unaware of a threat, you cannot react to a blow. I think we probably should have spelled this out a wee bit clearer, but space in the Stealth description was extraordinarily tight and ever word was at a premium. That said, I think these changes clear up the situation immensely (compared to where they were.. which was nebulous at best).
They didn't bother changing the RAW because most people use common sense and play it that way. Stealthed = sneak, etc.
RAW + Pathfinder = Sad Panda
This is why, whether you like this or not, a pure RAW approach to Pathfinder is always going to be frustrating; the devs explicitly don't bother to clean up RAW when RAI and/or common sense is clear. It's not a priority of theirs and I for one am pretty happy about that - they spend their intellectual capital making new interesting fun content instead of crafting rules and just retreading the same content year after year like WotC did with 3.5 (Return to the Return to the 1e Module, anyone?).
If I am interpreting your question correctly, no, you don't get to double dip.
DR does not negate sneak attack damage. The sneak attack damage is not a special effect that accompanies the attack, it is part of the
damage roll. Hope that clears it up.
Jason Bulmahn Lead Designer Paizo Publishing
...Meaning the damage is one lump sum.
The +5 hit and +5 damage (at level 20) applies to the individual attack. If you have multiple attacks (as would be expected of a 20th level slayer) then each attack also gets this bonus. This means that the +20/+15/+10/+5 you have for your attack bonus is +25/+20/+15/+10 before you add in your stat modifiers, flanking, weapons bonuses and spells. Additionally, each attack in that multiattack sequence gets a flat +5 to damage (totaling +20 damage should all attacks hit) before calculating strength bonus, weapon bonus and other magics.
One damage "roll" can contain multiple additions and dice from different sources, but it is still one damage roll. So if your slayer was using a +3 flaming greatsword and had a +4 STR bonus and 6d6 sneak attack and +5 studied target bonus, the damage roll is 2d6 (sword) + 3 + 1d6 (flaming) + 4 + 6d6 +5. When an ability intends to add a point per die, it is instead worded as e.g. "+1 per die of damage."
So you do get a +5 to hit and damage but they are not treated as separate entities. Ergo, its a one time addition to damage and to hit. Its not meant to be a boon per die being rolled. Otherwise you would have a rogue that would always hit on targets they are able to sneak attack and always do massive amounts of damage.
Remember, although not stated in the rules, the concept "damage roll" refers to the whole pack of dices rolled and it's bonuses when damage is rolled, in opposition to "single dice roll". You can see similar language in all strength damage bonus descriptions in the rules:
Strength: Temporary increases to your Strength score give you a bonus on Strength-based skill checks, melee attack rolls, and weapon damage rolls (if they rely on Strength). The bonus also applies to your Combat Maneuver Bonus (if you are Small or larger) and to your Combat Maneuver Defense.
And yet, a Greatsword (2d6, or 1d6+1d6 to damage if you prefer), only gets the strength bonus once (which is 1.5 in this case because it is a 2-handed weapon), and it doesn't matter if you apply sneak attack or a flaming effect to it, the strength bonus only applies once to the damage roll.
Source
Best Answer
Thug Rogue
A build I recommend a lot on this site is the Thug Rogue.
The Thug is an archetype for the Rogue in pathfinder. It allows you to stack the Shaken condition from Intimidate up to Frightened. If you score well enough on Intimidate to make it last for four rounds or longer. With the Enforcer feat, you can Intimidate for free any time you use non-lethal damage. With the Swashbuckler archetype (stacks with Thug), you can swift action demoralize a certain number of times per day.
How is this relevant to what you want to do? Enter Shatter Defenses. It requires Weapon Focus and Dazzling Display, but once you have it, if you attack a Shaken or Frightened person, they are Flat-Footed against you until your next turn. Wham, bam, thank you ma'am.
Produce Flame
Produce Flame is a great spell. Much-maligned, people often forget that it isn't just for hurling fire bolts at people - the flame held in your hand can be used for melee touch attacks at no cost to the duration. Note that unlike spells such as shocking grasp or inflict light wounds, the 'charge' is not used up if you strike someone with the touch attack - this means you can potentially full-attack people with your palm of flame (although you can't dual wield it - i'd recommend actually using a non-lethal weapon like a sap (or an Improved Unarmed Strike) in your off-hand to trigger Enforcer/Thug/Shatter Defenses, before you go in for the kill with your murderpalm).
A druid dip gives you access to this fantastic spell, in addition to other goodies (like an Animal Companion who can trigger Flanking).